X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/8540d5d19ebac6a3f30d82f36ff33f19d728f10b..9f4a7ba694b4b01a362836adcbcbdcfca9e8a3c3:/target/linux/generic-2.6/patches-2.6.26/600-phy_extension.patch diff --git a/target/linux/generic-2.6/patches-2.6.26/600-phy_extension.patch b/target/linux/generic-2.6/patches-2.6.26/600-phy_extension.patch index 6ac585eef..39f22bbde 100644 --- a/target/linux/generic-2.6/patches-2.6.26/600-phy_extension.patch +++ b/target/linux/generic-2.6/patches-2.6.26/600-phy_extension.patch @@ -20,7 +20,7 @@ + if (copy_to_user(useraddr, &ecmd, sizeof(ecmd))) + return -EFAULT; + return 0; -+ ++ + case ETHTOOL_SSET: + if (copy_from_user(&ecmd, useraddr, sizeof(ecmd))) + return -EFAULT; @@ -33,7 +33,7 @@ + tmp |= (BMCR_ANRESTART); + phy_write(phydev, MII_BMCR, tmp); + return 0; -+ } ++ } + return -EINVAL; + + case ETHTOOL_GLINK: @@ -51,9 +51,29 @@ /** * phy_mii_ioctl - generic PHY MII ioctl interface * @phydev: the phy_device struct +@@ -403,8 +447,8 @@ + } + + phy_write(phydev, mii_data->reg_num, val); +- +- if (mii_data->reg_num == MII_BMCR ++ ++ if (mii_data->reg_num == MII_BMCR + && val & BMCR_RESET + && phydev->drv->config_init) { + phy_scan_fixups(phydev); +@@ -524,7 +568,7 @@ + int idx; + + idx = phy_find_setting(phydev->speed, phydev->duplex); +- ++ + idx++; + + idx = phy_find_valid(idx, phydev->supported); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -399,6 +399,7 @@ +@@ -434,6 +434,7 @@ void phy_stop_machine(struct phy_device *phydev); int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd); int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd);