Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / net / tulip / media.c
index 919c40c..f53396f 100644 (file)
@@ -81,25 +81,6 @@ int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
                return retval & 0xffff;
        }
 
-       if(tp->chip_id == ULI526X && tp->revision >= 0x40) {
-               int value;
-               int i = 1000;
-               
-               value = ioread32(ioaddr + CSR9);
-               iowrite32(value & 0xFFEFFFFF, ioaddr + CSR9);
-               
-               value = (phy_id << 21) | (location << 16) | 0x08000000;
-               iowrite32(value, ioaddr + CSR10);
-               
-               while(--i > 0) {
-                       mdio_delay();
-                       if(ioread32(ioaddr + CSR10) & 0x10000000)
-                               break;
-               }
-               retval = ioread32(ioaddr + CSR10);
-               spin_unlock_irqrestore(&tp->mii_lock, flags);
-               return retval & 0xFFFF;
-       }
        /* Establish sync by sending at least 32 logic ones. */
        for (i = 32; i >= 0; i--) {
                iowrite32(MDIO_ENB | MDIO_DATA_WRITE1, mdio_addr);
@@ -159,23 +140,6 @@ void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val)
                spin_unlock_irqrestore(&tp->mii_lock, flags);
                return;
        }
-       if (tp->chip_id == ULI526X && tp->revision >= 0x40) {
-               int value;
-               int i = 1000;
-               
-               value = ioread32(ioaddr + CSR9);
-               iowrite32(value & 0xFFEFFFFF, ioaddr + CSR9);
-               
-               value = (phy_id << 21) | (location << 16) | 0x04000000 | (val & 0xFFFF);
-               iowrite32(value, ioaddr + CSR10);
-               
-               while(--i > 0) {
-                       if (ioread32(ioaddr + CSR10) & 0x10000000)
-                               break;
-               }
-               spin_unlock_irqrestore(&tp->mii_lock, flags);
-               return;
-       }
                
        /* Establish sync by sending 32 logic ones. */
        for (i = 32; i >= 0; i--) {
@@ -400,6 +364,9 @@ void tulip_select_media(struct net_device *dev, int startup)
        }
 
        tp->csr6 = new_csr6 | (tp->csr6 & 0xfdff) | (tp->full_duplex ? 0x0200 : 0);
+
+       mdelay(1);
+
        return;
 }