Date: Mon, 19 Dec 2022 15:18:12 +0100 From: Emmanuel Vadot <manu@bidouilliste.com> To: Ganbold Tsagaankhuu <ganbold@FreeBSD.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 19 Dec 2022 13:10:14 GMT Ganbold Tsagaankhuu <ganbold@FreeBSD.org> 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 <sos@FreeBSD.org> > AuthorDate: 2022-12-19 12:56:51 +0000 > Commit: Ganbold Tsagaankhuu <ganbold@FreeBSD.org> > 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 <manu@bidouilliste.com> <manu@FreeBSD.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20221219151812.0b94c79f6df7f724de5b961b>