diff options
author | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-07-12 02:02:58 +0000 |
---|---|---|
committer | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-07-12 02:02:58 +0000 |
commit | 451089be3aca7436f86ada90a39e450dc4ad7874 (patch) | |
tree | 6870fa2b5548592459151c5a5d25ceef5e45892d /target/linux/ixp4xx/patches-2.6.24/203-npe_driver_phy_reset_autoneg.patch | |
parent | 08c3d434a7d03a4e3ae146be2c27a3b49699fd3d (diff) |
nuke most of the old ixp4xx patchsets
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11778 3c298f89-4303-0410-b956-a3cf2f4a3e73
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.patch | 44 |
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 0788ce333..000000000 --- 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) |