summaryrefslogtreecommitdiff
path: root/target/linux/ixp4xx/patches-2.6.24/203-npe_driver_phy_reset_autoneg.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2008-07-12 02:02:58 +0000
committerImre Kaloz <kaloz@openwrt.org>2008-07-12 02:02:58 +0000
commit75aa30ada882353a8477ac83a609d4012726c540 (patch)
treea9007f11ef59f23ec761997f6092a6f517aaa501 /target/linux/ixp4xx/patches-2.6.24/203-npe_driver_phy_reset_autoneg.patch
parentfc80a0718439b330f4405d9875e936e2c783f43c (diff)
downloadmtk-20170518-75aa30ada882353a8477ac83a609d4012726c540.zip
mtk-20170518-75aa30ada882353a8477ac83a609d4012726c540.tar.gz
mtk-20170518-75aa30ada882353a8477ac83a609d4012726c540.tar.bz2
nuke most of the old ixp4xx patchsets
SVN-Revision: 11778
Diffstat (limited to 'target/linux/ixp4xx/patches-2.6.24/203-npe_driver_phy_reset_autoneg.patch')
-rw-r--r--target/linux/ixp4xx/patches-2.6.24/203-npe_driver_phy_reset_autoneg.patch44
1 files changed, 0 insertions, 44 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.24/203-npe_driver_phy_reset_autoneg.patch b/target/linux/ixp4xx/patches-2.6.24/203-npe_driver_phy_reset_autoneg.patch
deleted file mode 100644
index 0788ce3..0000000
--- a/target/linux/ixp4xx/patches-2.6.24/203-npe_driver_phy_reset_autoneg.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Index: linux-2.6.24.7/drivers/net/arm/ixp4xx_eth.c
-===================================================================
---- linux-2.6.24.7.orig/drivers/net/arm/ixp4xx_eth.c
-+++ linux-2.6.24.7/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)