1 Index: linux-2.6.24.7/drivers/net/arm/ixp4xx_eth.c
2 ===================================================================
3 --- linux-2.6.24.7.orig/drivers/net/arm/ixp4xx_eth.c
4 +++ linux-2.6.24.7/drivers/net/arm/ixp4xx_eth.c
5 @@ -322,8 +322,12 @@ static void phy_reset(struct net_device
6 struct port *port = netdev_priv(dev);
7 int phy_id = port->mii[idx].phy_id;
11 - mdio_write(dev, phy_id, MII_BMCR, port->mii_bmcr[idx] | BMCR_RESET);
13 + bmcr = mdio_read(dev, phy_id, MII_BMCR);
14 + bmcr |= BMCR_ANENABLE;
15 + mdio_write(dev, phy_id, MII_BMCR, bmcr | BMCR_RESET);
17 while (cycles < MAX_MII_RESET_RETRIES) {
18 if (!(mdio_read(dev, phy_id, MII_BMCR) & BMCR_RESET)) {
19 @@ -331,13 +335,23 @@ static void phy_reset(struct net_device
20 printk(KERN_DEBUG "%s: phy_reset() took %i cycles\n",
30 - printk(KERN_ERR "%s: MII reset failed on PHY%2d\n", dev->name, phy_id);
31 + if (cycles == MAX_MII_RESET_RETRIES) {
32 + printk(KERN_ERR "%s: MII reset failed on PHY%2d\n", dev->name,
37 + /* restart auto negotiation */
38 + bmcr = mdio_read(dev, phy_id, MII_BMCR);
39 + bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
40 + mdio_write(dev, phy_id, MII_BMCR, bmcr);
44 static void eth_set_duplex(struct port *port, int full_duplex)