lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Sep 2008 15:06:52 +0200
From:	Lennert Buytenhek <>
To:	Andy Fleming <>
Subject: [PATCH] phylib: phy_mii_ioctl() fixes

Make the SIOCGMIIPHY case fall through properly (it is supposed
to not only return the ID of the default PHY but also to read from
that PHY), and make phy_mii_ioctl() return the same error code as
generic_mii_ioctl() in case of an unsupported operation.

Signed-off-by: Lennert Buytenhek <>

Index: linux-2.6/drivers/net/phy/phy.c
--- linux-2.6.orig/drivers/net/phy/phy.c
+++ linux-2.6/drivers/net/phy/phy.c
@@ -411,7 +411,8 @@ int phy_mii_ioctl(struct phy_device *phy
 	switch (cmd) {
 		mii_data->phy_id = phydev->addr;
-		break;
+		/* fall through */
 		mii_data->val_out = phy_read(phydev, mii_data->reg_num);
@@ -458,7 +459,7 @@ int phy_mii_ioctl(struct phy_device *phy
-		return -ENOTTY;
+		return -EOPNOTSUPP;
 	return 0;
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists