diff options
Diffstat (limited to 'drivers/net/ethernet/marvell/mvmdio.c')
-rw-r--r-- | drivers/net/ethernet/marvell/mvmdio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index 7354960b583b..c4eeb69a5bee 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c | |||
@@ -92,6 +92,12 @@ static int orion_mdio_wait_ready(struct mii_bus *bus) | |||
92 | if (time_is_before_jiffies(end)) | 92 | if (time_is_before_jiffies(end)) |
93 | ++timedout; | 93 | ++timedout; |
94 | } else { | 94 | } else { |
95 | /* wait_event_timeout does not guarantee a delay of at | ||
96 | * least one whole jiffie, so timeout must be no less | ||
97 | * than two. | ||
98 | */ | ||
99 | if (timeout < 2) | ||
100 | timeout = 2; | ||
95 | wait_event_timeout(dev->smi_busy_wait, | 101 | wait_event_timeout(dev->smi_busy_wait, |
96 | orion_mdio_smi_is_done(dev), | 102 | orion_mdio_smi_is_done(dev), |
97 | timeout); | 103 | timeout); |