From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH] net: sh_eth: do not advertise Gigabit capabilities when not available Date: Mon, 4 Dec 2017 16:09:04 +0100 Message-ID: <20171204150904.GD4026@lunn.ch> References: <20171204141346.17410-1-thomas.petazzoni@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , Sergei Shtylyov , Niklas =?iso-8859-1?Q?S=F6derlund?= , Geert Uytterhoeven , Simon Horman , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org To: Thomas Petazzoni Return-path: Content-Disposition: inline In-Reply-To: <20171204141346.17410-1-thomas.petazzoni@free-electrons.com> Sender: linux-renesas-soc-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Mon, Dec 04, 2017 at 03:13:46PM +0100, Thomas Petazzoni wrote: > Not all variants of the sh_eth hardware have Gigabit > support. Unfortunately, the current driver doesn't update > phydev->supported depending on the MAC capabilities. Due to this, if > you have a Gigabit capable PHY, the PHY will advertise its Gigabit > capability and establish a link at 1Gbit/s, even though the MAC > doesn't support it. > > In order to avoid this, we mark phydev->supported if we're running a > non-Gigabit capable hardware. > > Tested on a SH7786 platform, with a Gigabit PHY. > > Signed-off-by: Thomas Petazzoni Reviewed-by: Andrew Lunn Andrew