Skip to content
Commit 1a1f20bc authored by Leigh Brown's avatar Leigh Brown Committed by David S. Miller
Browse files

net: mvmdio: fix interrupt timeout handling



This version corrects the whitespace issue.

orion_mdio_wait_ready uses wait_event_timeout to wait for the
SMI interrupt to fire.  wait_event_timeout waits for between
"timeout - 1" and "timeout" jiffies.  In this case a 1ms timeout
when HZ is 1000 results in a wait of 0 to 1 jiffies, causing
premature timeouts.

This fix ensures a minimum timeout of 2 jiffies, ensuring
wait_event_timeout will always wait at least 1 jiffie.

Issue reported by Nicolas Schichan.

Tested-by: default avatarNicolas Schichan <nschichan@freebox.fr>
Signed-off-by: default avatarLeigh Brown <leigh@solinno.co.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a4f63634
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment