From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH 1/3] net: phy: add support to detect 100BASE-T1 capability Date: Wed, 13 Dec 2017 21:11:10 +0100 Message-ID: <20171213201110.GB932@lunn.ch> References: <20171213173751.12722-1-l.stach@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Fainelli , netdev@vger.kernel.org, kernel@pengutronix.de, patchwork-lst@pengutronix.de To: Lucas Stach Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:60073 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753803AbdLMULL (ORCPT ); Wed, 13 Dec 2017 15:11:11 -0500 Content-Disposition: inline In-Reply-To: <20171213173751.12722-1-l.stach@pengutronix.de> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Dec 13, 2017 at 06:37:49PM +0100, Lucas Stach wrote: > 100BASE-T1 is the automotive ethernet standard 802.3bw-2015. Currently > we don't detect any valid modes for PHYs, which only support this > standard. Add support to detect the common 100Mbit full-duplex mode. > > Signed-off-by: Lucas Stach > --- > drivers/net/phy/phy_device.c | 2 ++ > include/uapi/linux/mii.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c > index 67f25ac29025..8ef48b38d97b 100644 > --- a/drivers/net/phy/phy_device.c > +++ b/drivers/net/phy/phy_device.c > @@ -1607,6 +1607,8 @@ int genphy_config_init(struct phy_device *phydev) > if (val < 0) > return val; > > + if (val & ESTATUS_100T1_FULL) > + features |= SUPPORTED_100baseT_Full; Hi Lucas Why did you decide to do this, and not add a SUPPORTED_100baseT1? Could a device support both 100-BASE-T and 100-BASE-T1? If at some point we need to differentiate between them, it is going to be hard. Especially since this is part of the kernel ABI. Andrew