netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] net: phy: add support to detect 100BASE-T1 capability
@ 2017-12-13 17:37 Lucas Stach
  2017-12-13 17:37 ` [PATCH 2/3] net: phy: select sensible mode for non-autoneg PHYs on startup Lucas Stach
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lucas Stach @ 2017-12-13 17:37 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli; +Cc: netdev, kernel, patchwork-lst

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 <l.stach@pengutronix.de>
---
 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;
 		if (val & ESTATUS_1000_TFULL)
 			features |= SUPPORTED_1000baseT_Full;
 		if (val & ESTATUS_1000_THALF)
diff --git a/include/uapi/linux/mii.h b/include/uapi/linux/mii.h
index b5c2fdcf23fd..eb5cc45d23fb 100644
--- a/include/uapi/linux/mii.h
+++ b/include/uapi/linux/mii.h
@@ -121,6 +121,7 @@
 #define EXPANSION_MFAULTS	0x0010	/* Multiple faults detected    */
 #define EXPANSION_RESV		0xffe0	/* Unused...                   */
 
+#define ESTATUS_100T1_FULL	0x0080	/* Can do 100BASE-T1 Full      */
 #define ESTATUS_1000_TFULL	0x2000	/* Can do 1000BT Full          */
 #define ESTATUS_1000_THALF	0x1000	/* Can do 1000BT Half          */
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-12-14 10:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-13 17:37 [PATCH 1/3] net: phy: add support to detect 100BASE-T1 capability Lucas Stach
2017-12-13 17:37 ` [PATCH 2/3] net: phy: select sensible mode for non-autoneg PHYs on startup Lucas Stach
2017-12-13 17:37 ` [PATCH 3/3] net: phy: sanitize autoneg in phy_start_aneg_priv Lucas Stach
2017-12-13 20:11 ` [PATCH 1/3] net: phy: add support to detect 100BASE-T1 capability Andrew Lunn
2017-12-14  9:21   ` Lucas Stach
2017-12-14  9:46     ` Andrew Lunn
2017-12-14 10:30       ` Lucas Stach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).