[PATCH] net: dwc_eth_qos: Pass -1 to phy_connect() to scan for all PHYs

Ramon Fried rfried.dev at gmail.com
Wed Dec 18 16:25:26 CET 2019


On Wed, Dec 18, 2019 at 2:17 PM Patrick DELAUNAY
<patrick.delaunay at st.com> wrote:
>
> Hi,
>
> > From: Marek Vasut <marex at denx.de>
> > Sent: mercredi 18 décembre 2019 07:49
> >
> > PHY address 0 is a valid PHY address, to scan for all PHYs, pass -1 to
> > phy_connect(). Passing 0 used to work before be accident, but does no longer.
> >
> > Signed-off-by: Marek Vasut <marex at denx.de>
> > Cc: Joe Hershberger <joe.hershberger at ni.com>
> > Cc: Patrice Chotard <patrice.chotard at st.com>
> > Cc: Patrick Delaunay <patrick.delaunay at st.com>
> > Cc: Ramon Fried <rfried.dev at gmail.com>
>
> Reviewed-by: Patrick Delaunay <patrick.delaunay at st.com>
>
> > ---
> >  drivers/net/dwc_eth_qos.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index
> > da5b696c9d..4632111635 100644
> > --- a/drivers/net/dwc_eth_qos.c
> > +++ b/drivers/net/dwc_eth_qos.c
> > @@ -1045,7 +1045,7 @@ static int eqos_start(struct udevice *dev)
> >        * don't need to reconnect/reconfigure again
> >        */
> >       if (!eqos->phy) {
> > -             eqos->phy = phy_connect(eqos->mii, 0, dev,
> > +             eqos->phy = phy_connect(eqos->mii, -1, dev,
> >                                       eqos->config->interface(dev));
> >               if (!eqos->phy) {
> >                       pr_err("phy_connect() failed");
> > --
> > 2.24.1
>
> Regards
>
Reviewed-By: Ramon Fried <rfried.dev at gmail.com>


More information about the U-Boot mailing list