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?