]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
net: fec: Adjust ENET MDIO timeouts
authorRogerio Pimentel <rogerio.pimentel@freescale.com>
Tue, 27 Dec 2011 19:07:37 +0000 (14:07 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Dec 2011 17:55:18 +0000 (12:55 -0500)
On extensive NFS boots on a mx6qsabrelite board it was noted that "FEC: MDIO read timeout" were occuring,
which caused failure on loading the FEC driver.

The original FEC_MII_TIMEOUT was set to 1 ms, which is too low when passed to the usecs_to_jiffies macro.

On ARM one jiffy is 10ms, so use a timeout of 30ms, which corresponds to 3 jiffies.

After running extensive NFS boots, the MDIO timeouts do not occur anymore with this change.

Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.c

index 4ea2bdc852f806756698a04309b905a1b77cc8c3..b0b04453c7cc16f6f1465af8a27e3d3084f16c7f 100644 (file)
@@ -255,7 +255,7 @@ struct fec_enet_private {
 #define FEC_MMFR_TA            (2 << 16)
 #define FEC_MMFR_DATA(v)       (v & 0xffff)
 
-#define FEC_MII_TIMEOUT                1000 /* us */
+#define FEC_MII_TIMEOUT                30000 /* us */
 
 /* Transmitter timeout */
 #define TX_TIMEOUT (2 * HZ)