Subject: Re: [PATCH] net: sh_eth: do not advertise Gigabit capabilities when not available

From: Andrew Lunn <[email-masked]>
Date: Mon, 4 Dec 2017 20:25:28 +0100

> >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