]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/r8169.c
r8169: fix mdio_read and update mdio_write according to hw specs
[net-next-2.6.git] / drivers / net / r8169.c
index 03a8318d90a294eb245ba3b149fbc3570a56d717..96b6cfbf0a3a682b14216fa23a9e737a48973aaa 100644 (file)
@@ -560,10 +560,10 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
                udelay(25);
        }
        /*
-        * Some configurations require a small delay even after the write
-        * completed indication or the next write might fail.
+        * According to hardware specs a 20us delay is required after write
+        * complete indication, but before sending next command.
         */
-       udelay(25);
+       udelay(20);
 }
 
 static int mdio_read(void __iomem *ioaddr, int reg_addr)
@@ -583,6 +583,12 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr)
                }
                udelay(25);
        }
+       /*
+        * According to hardware specs a 20us delay is required after read
+        * complete indication, but before sending next command.
+        */
+       udelay(20);
+
        return value;
 }