Thread (5 messages) flat view 5 messages, 4 authors, 2012-11-23
STALE5043d

Re: [PATCH 1/1 v2] net: add micrel KSZ8873MLL switch support

From: Joe Perches <joe@perches.com>
Date: 2012-11-21 19:03:56
Also in: linux-arm-kernel

On Wed, 2012-11-21 at 16:38 +0100, Jean-Christophe PLAGNIOL-VILLARD
wrote:
this will allow to detect the link between the switch and the soc
[]
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
[]
quoted hunk ↗ jump to hunk
@@ -127,6 +127,39 @@ static int ks8051_config_init(struct phy_device *phydev)
[]
+int ksz8873mll_read_status(struct phy_device *phydev)
+{
[]
+	regval = phy_read(phydev, KSZ8873MLL_GLOBAL_CONTROL_4);
+
+	if (regval & KSZ8873MLL_GLOBAL_CONTROL_4_DUPLEX)
+		phydev->duplex = DUPLEX_HALF;
+	else
+		phydev->duplex = DUPLEX_FULL;
This doesn't check for phy_read errors.
Shouldn't it?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help