From nobody Mon Dec 19 14:18:12 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NbMHs3C1Vzt4Bq; Mon, 19 Dec 2022 14:18:17 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NbMHr4f9vz4LVG; Mon, 19 Dec 2022 14:18:16 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1671459494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JpKfrMep26ztdbuznZS5m4xrvAz/GD9waQTy+wysGME=; b=AbI7S0e0Y9VdYNV5ysynSzrPKIWPwNkWn1pyiH2Zy6tfxKtUg828qcCX/8+w7y17hqCy1Y 6Y8izAqOI9JJ0KLeCSPOjuM7KLUc9oKM/EM5rBnz3ZprAYe8u+SKHG3BiUNvR5HapbnaBo /bpbWZsqeV2IbzIunOq2+vYqmoSSz3k= Received: from amy.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id a83e8673 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 19 Dec 2022 14:18:14 +0000 (UTC) Date: Mon, 19 Dec 2022 15:18:12 +0100 From: Emmanuel Vadot To: Ganbold Tsagaankhuu Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 6692670f58f9 - main - Enable setting the phy id. Message-Id: <20221219151812.0b94c79f6df7f724de5b961b@bidouilliste.com> In-Reply-To: <202212191310.2BJDAErn075666@gitrepo.freebsd.org> References: <202212191310.2BJDAErn075666@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4NbMHr4f9vz4LVG X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Mon, 19 Dec 2022 13:10:14 GMT Ganbold Tsagaankhuu wrote: > The branch main has been updated by ganbold: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D6692670f58f9069e59bc0c958f= daefb9bea5f726 >=20 > commit 6692670f58f9069e59bc0c958fdaefb9bea5f726 > Author: S=F8ren Schmidt > AuthorDate: 2022-12-19 12:56:51 +0000 > Commit: Ganbold Tsagaankhuu > CommitDate: 2022-12-19 13:08:42 +0000 >=20 > Enable setting the phy id. > =20 > It is needed for the RK356X combo phy. How so ? The id must be set in the phynode creation with phynode_create so I don't understand why you need this. > --- > sys/dev/extres/phy/phy.c | 7 +++++++ > sys/dev/extres/phy/phy.h | 1 + > 2 files changed, 8 insertions(+) >=20 > diff --git a/sys/dev/extres/phy/phy.c b/sys/dev/extres/phy/phy.c > index 0ed633ffbe41..e95cfdfbd4b3 100644 > --- a/sys/dev/extres/phy/phy.c > +++ b/sys/dev/extres/phy/phy.c > @@ -210,6 +210,13 @@ intptr_t phynode_get_id(struct phynode *phynode) > return (phynode->id); > } > =20 > +void > +phynode_set_id(struct phynode *phynode, intptr_t id) > +{ > + > + phynode->id =3D id; > +} > + > #ifdef FDT > phandle_t > phynode_get_ofw_node(struct phynode *phynode) > diff --git a/sys/dev/extres/phy/phy.h b/sys/dev/extres/phy/phy.h > index b0e5249e4246..34ba59447257 100644 > --- a/sys/dev/extres/phy/phy.h > +++ b/sys/dev/extres/phy/phy.h > @@ -65,6 +65,7 @@ struct phynode *phynode_register(struct phynode *phynod= e); > void *phynode_get_softc(struct phynode *phynode); > device_t phynode_get_device(struct phynode *phynode); > intptr_t phynode_get_id(struct phynode *phynode); > +void phynode_set_id(struct phynode *phynode, intptr_t id); > int phynode_enable(struct phynode *phynode); > int phynode_disable(struct phynode *phynode); > int phynode_status(struct phynode *phynode, int *status); --=20 Emmanuel Vadot