diff options
author | Rogerio Pimentel <rogerio.pimentel@freescale.com> | 2011-12-26 10:23:48 -0800 |
---|---|---|
committer | Rogerio Pimentel <rogerio.pimentel@freescale.com> | 2011-12-27 04:34:11 -0800 |
commit | a6b816bb61e8974ca01afb5da34663a0374c3c8f (patch) | |
tree | cfa4845444c938709954c56743437dd8f2493069 | |
parent | eae629dc349bbc1656d71e5922868505876ff35f (diff) |
ENGR00161871: ENET: Changing MDIO read and write timeout
The original FEC_MII_TIMEOUT was set to 1ms, which is too low when
passed to the usecs_to_jiffies macro.
On ARM one jiffy is 10ms, so use msecs_to_jiffies instead and use
a timeout of 30ms, which corresponds to 3 jiffies.
After running 3 hours NFS boots, the MDIO timeout do not occur
anymore.
Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
-rw-r--r-- | drivers/net/fec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index ec5070626824..bf6c10055607 100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -246,7 +246,7 @@ static void fec_stop(struct net_device *dev); #define FEC_MMFR_TA (2 << 16) #define FEC_MMFR_DATA(v) (v & 0xffff) -#define FEC_MII_TIMEOUT 2000 /* us */ +#define FEC_MII_TIMEOUT 30 /* ms */ /* Transmitter timeout */ #define TX_TIMEOUT (2 * HZ) @@ -759,7 +759,7 @@ static int fec_enet_mdio_read(struct mii_bus *bus, int mii_id, int regnum) /* wait for end of transfer */ time_left = wait_for_completion_timeout(&fep->mdio_done, - usecs_to_jiffies(FEC_MII_TIMEOUT)); + msecs_to_jiffies(FEC_MII_TIMEOUT)); if (time_left == 0) { fep->mii_timeout = 1; printk(KERN_ERR "FEC: MDIO read timeout, mii_id=%d\n", mii_id); @@ -787,7 +787,7 @@ static int fec_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum, /* wait for end of transfer */ time_left = wait_for_completion_timeout(&fep->mdio_done, - usecs_to_jiffies(FEC_MII_TIMEOUT)); + msecs_to_jiffies(FEC_MII_TIMEOUT)); if (time_left == 0) { fep->mii_timeout = 1; printk(KERN_ERR "FEC: MDIO write timeout, mii_id=%d\n", mii_id); |