Skip to contentSkip to conversation

drivers/net/phy/: default return value in ioctl phy.c

PATCH In review Rini van Zetten 2 participants 2 messages Dec 11, 2007 – Jan 14, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/net/phy/: default return value in ioctl phy.c

Hello Andy,

This patch (to 2.6.23.9) add a default return value EOPNOTSUPP to the ioctl function. The problem with the always 0 return value is that the iwconfig (wireless) tool found a valid device when an ethernet device uses the phy abstraction layer. I 've tetsted this with the macb driver.

drivers/net/phy/phy.c +2 -0
index cb230f4..c07460d 100644
@@ -405,6 +405,8 @@ int phy_mii_ioctl(struct phy_device *phydev,
                               && phydev->drv->config_init)
                       phydev->drv->config_init(phydev);
               break;
+       default:
+               return -EOPNOTSUPP;
       }
 
       return 0;
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Rini van Zetten

Hello Andy,

This patch (to 2.6.23.9) add a default return value EOPNOTSUPP to the ioctl function. The problem with the always 0 return value is that the iwconfig (wireless) tool found a valid device when an ethernet device uses the phy abstraction layer. I 've tetsted this with the macb driver.