Re: git: 6692670f58f9 - main - Enable setting the phy id.

From: Ganbold Tsagaankhuu <ganbold_at_gmail.com>
Date: Mon, 19 Dec 2022 15:16:28 UTC
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>
>