[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171204192528.GB12805@lunn.ch>
Date: Mon, 4 Dec 2017 20:25:28 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
"David S. Miller" <davem@...emloft.net>,
Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Simon Horman <horms+renesas@...ge.net.au>,
netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH] net: sh_eth: do not advertise Gigabit capabilities when
not available
> >diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> >index db72d13cebb9..0074c5998481 100644
> >--- a/drivers/net/ethernet/renesas/sh_eth.c
> >+++ b/drivers/net/ethernet/renesas/sh_eth.c
> >@@ -1892,6 +1892,11 @@ static int sh_eth_phy_init(struct net_device *ndev)
> > return PTR_ERR(phydev);
> > }
> >+ /* mask with MAC supported features */
> >+ if (mdp->cd->register_type != SH_ETH_REG_GIGABIT)
> >+ phydev->supported &= PHY_BASIC_FEATURES;
> >+ phydev->advertising = phydev->supported;
> >+
>
> Um, looking at this again, I think we have phy_set_max_speed() for that
> kind of stuff now...
Ah, yes. I forgot about that.
Thomas, can you make a v2?
Andrew
Powered by blists - more mailing lists