aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ixp4xx/patches-2.6.27/203-npe_driver_phy_reset_autoneg.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2009-06-23 13:38:43 +0000
committerImre Kaloz <kaloz@openwrt.org>2009-06-23 13:38:43 +0000
commit03c5b7d96af72455957b1b7f3518f6a1c44e92a5 (patch)
treee7c288c699907442ac8823d927b3f5a9b32204d5 /target/linux/ixp4xx/patches-2.6.27/203-npe_driver_phy_reset_autoneg.patch
parentaafcab83642e9ab1cc53dc37f3494db7e350634e (diff)
downloadupstream-03c5b7d96af72455957b1b7f3518f6a1c44e92a5.tar.gz
upstream-03c5b7d96af72455957b1b7f3518f6a1c44e92a5.tar.bz2
upstream-03c5b7d96af72455957b1b7f3518f6a1c44e92a5.zip
2.6.28 and 2.6.30 support is enough on ixp4xx
SVN-Revision: 16545
Diffstat (limited to 'target/linux/ixp4xx/patches-2.6.27/203-npe_driver_phy_reset_autoneg.patch')
-rw-r--r--target/linux/ixp4xx/patches-2.6.27/203-npe_driver_phy_reset_autoneg.patch42
1 files changed, 0 insertions, 42 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.27/203-npe_driver_phy_reset_autoneg.patch b/target/linux/ixp4xx/patches-2.6.27/203-npe_driver_phy_reset_autoneg.patch
deleted file mode 100644
index b6519f0343..0000000000
--- a/target/linux/ixp4xx/patches-2.6.27/203-npe_driver_phy_reset_autoneg.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/drivers/net/arm/ixp4xx_eth.c
-+++ b/drivers/net/arm/ixp4xx_eth.c
-@@ -322,8 +322,12 @@ static void phy_reset(struct net_device
- struct port *port = netdev_priv(dev);
- int phy_id = port->mii[idx].phy_id;
- int cycles = 0;
-+ u16 bmcr;
-
-- mdio_write(dev, phy_id, MII_BMCR, port->mii_bmcr[idx] | BMCR_RESET);
-+ /* reset the PHY */
-+ bmcr = mdio_read(dev, phy_id, MII_BMCR);
-+ bmcr |= BMCR_ANENABLE;
-+ mdio_write(dev, phy_id, MII_BMCR, bmcr | BMCR_RESET);
-
- while (cycles < MAX_MII_RESET_RETRIES) {
- if (!(mdio_read(dev, phy_id, MII_BMCR) & BMCR_RESET)) {
-@@ -331,13 +335,23 @@ static void phy_reset(struct net_device
- printk(KERN_DEBUG "%s: phy_reset() took %i cycles\n",
- dev->name, cycles);
- #endif
-- return;
-+ break;
- }
- udelay(1);
- cycles++;
- }
-
-- printk(KERN_ERR "%s: MII reset failed on PHY%2d\n", dev->name, phy_id);
-+ if (cycles == MAX_MII_RESET_RETRIES) {
-+ printk(KERN_ERR "%s: MII reset failed on PHY%2d\n", dev->name,
-+ phy_id);
-+ return;
-+ }
-+
-+ /* restart auto negotiation */
-+ bmcr = mdio_read(dev, phy_id, MII_BMCR);
-+ bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
-+ mdio_write(dev, phy_id, MII_BMCR, bmcr);
-+
- }
-
- static void eth_set_duplex(struct port *port, int full_duplex)