Date: Mon, 19 Dec 2022 23:16:28 +0800 From: Ganbold Tsagaankhuu <ganbold@gmail.com> To: Emmanuel Vadot <manu@bidouilliste.com> Cc: Ganbold Tsagaankhuu <ganbold@freebsd.org>, 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: <CAGtf9xMjzfNf8MHeR7fstpCigSo%2BAHjTYp7aAG%2BNAy3DW=p-yg@mail.gmail.com> In-Reply-To: <20221219151812.0b94c79f6df7f724de5b961b@bidouilliste.com> References: <202212191310.2BJDAErn075666@gitrepo.freebsd.org> <20221219151812.0b94c79f6df7f724de5b961b@bidouilliste.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, Dec 19, 2022 at 10:18 PM Emmanuel Vadot <manu@bidouilliste.com> wrote: > On Mon, 19 Dec 2022 13:10:14 GMT > Ganbold Tsagaankhuu <ganbold@FreeBSD.org> wrote: > > > The branch main has been updated by ganbold: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=6692670f58f9069e59bc0c958fdaefb9bea5f726 > > > > commit 6692670f58f9069e59bc0c958fdaefb9bea5f726 > > Author: Søren 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 > > > > Enable setting the phy id. > > > > 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. > Will revert this commit until we find a proper solution. Ganbold > > > --- > > sys/dev/extres/phy/phy.c | 7 +++++++ > > sys/dev/extres/phy/phy.h | 1 + > > 2 files changed, 8 insertions(+) > > > > 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); > > } > > > > +void > > +phynode_set_id(struct phynode *phynode, intptr_t id) > > +{ > > + > > + phynode->id = 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 > *phynode); > > 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); > > > -- > Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org> > [-- Attachment #2 --] <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 19, 2022 at 10:18 PM Emmanuel Vadot <<a href="mailto:manu@bidouilliste.com">manu@bidouilliste.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, 19 Dec 2022 13:10:14 GMT<br> Ganbold Tsagaankhuu <ganbold@FreeBSD.org> wrote:<br> <br> > The branch main has been updated by ganbold:<br> > <br> > URL: <a href="https://cgit.FreeBSD.org/src/commit/?id=6692670f58f9069e59bc0c958fdaefb9bea5f726" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=6692670f58f9069e59bc0c958fdaefb9bea5f726</a><br> > <br> > commit 6692670f58f9069e59bc0c958fdaefb9bea5f726<br> > Author: Søren Schmidt <sos@FreeBSD.org><br> > AuthorDate: 2022-12-19 12:56:51 +0000<br> > Commit: Ganbold Tsagaankhuu <ganbold@FreeBSD.org><br> > CommitDate: 2022-12-19 13:08:42 +0000<br> > <br> > Enable setting the phy id.<br> > <br> > It is needed for the RK356X combo phy.<br> <br> How so ?<br> <br> The id must be set in the phynode creation with phynode_create so I<br> don't understand why you need this.<br></blockquote><div><br></div><div>Will revert this commit until we find a proper solution.</div><div><br></div><div>Ganbold</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br> > ---<br> > sys/dev/extres/phy/phy.c | 7 +++++++<br> > sys/dev/extres/phy/phy.h | 1 +<br> > 2 files changed, 8 insertions(+)<br> > <br> > diff --git a/sys/dev/extres/phy/phy.c b/sys/dev/extres/phy/phy.c<br> > index 0ed633ffbe41..e95cfdfbd4b3 100644<br> > --- a/sys/dev/extres/phy/phy.c<br> > +++ b/sys/dev/extres/phy/phy.c<br> > @@ -210,6 +210,13 @@ intptr_t phynode_get_id(struct phynode *phynode)<br> > return (phynode->id);<br> > }<br> > <br> > +void<br> > +phynode_set_id(struct phynode *phynode, intptr_t id)<br> > +{<br> > +<br> > + phynode->id = id;<br> > +}<br> > +<br> > #ifdef FDT<br> > phandle_t<br> > phynode_get_ofw_node(struct phynode *phynode)<br> > diff --git a/sys/dev/extres/phy/phy.h b/sys/dev/extres/phy/phy.h<br> > index b0e5249e4246..34ba59447257 100644<br> > --- a/sys/dev/extres/phy/phy.h<br> > +++ b/sys/dev/extres/phy/phy.h<br> > @@ -65,6 +65,7 @@ struct phynode *phynode_register(struct phynode *phynode);<br> > void *phynode_get_softc(struct phynode *phynode);<br> > device_t phynode_get_device(struct phynode *phynode);<br> > intptr_t phynode_get_id(struct phynode *phynode);<br> > +void phynode_set_id(struct phynode *phynode, intptr_t id);<br> > int phynode_enable(struct phynode *phynode);<br> > int phynode_disable(struct phynode *phynode);<br> > int phynode_status(struct phynode *phynode, int *status);<br> <br> <br> -- <br> Emmanuel Vadot <<a href="mailto:manu@bidouilliste.com" target="_blank">manu@bidouilliste.com</a>> <manu@FreeBSD.org><br> </blockquote></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGtf9xMjzfNf8MHeR7fstpCigSo%2BAHjTYp7aAG%2BNAy3DW=p-yg>
