netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Spurious timeouts in mvmdio
@ 2013-12-02 15:15 Nicolas Schichan
  2013-12-03 12:23 ` Jason Cooper
  0 siblings, 1 reply; 19+ messages in thread
From: Nicolas Schichan @ 2013-12-02 15:15 UTC (permalink / raw)
  To: LKML, netdev, linux-arm-kernel
  Cc: David S. Miller, Florian Fainelli, Leigh Brown,
	Sebastian Hesselbarth


Hi,

During 3.13-rc1 testing, I have found out that the mvmdio driver would report 
timeouts on the kernel console:

[   11.011334] orion-mdio orion-mdio: Timeout: SMI busy for too long

The hardware is a MV88F6281 Kirkwood CPU. The mvmdio driver is using the irq 
line 46 (ge00_err).

I am inclined to believe that it is due to the fact that wait_event_timeout() 
is called with a timeout parameter of 1 jiffy in orion_mdio_wait_ready(). If 
the timer interrupt ticks right after calling wait_event_timeout(), we may end 
up spending much less time than MVMDIO_SMI_TIMEOUT (1 msec) in 
wait_event_timeout(), and as a result report a timeout as the MDIO access did 
not complete in such a short time.

As to how to fix this, I see two options (I don't know which one would be 
prefered):

- Option 1: always pass a timeout of at least 2 jiffy to wait_event_timeout().
- Option 2: switch to wait_event_hrtimeout().

I can provide patches for both options.

Regards,

-- 
Nicolas Schichan

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-12-17 13:49 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02 15:15 Spurious timeouts in mvmdio Nicolas Schichan
2013-12-03 12:23 ` Jason Cooper
2013-12-03 12:40   ` Russell King - ARM Linux
2013-12-03 13:43     ` Jason Cooper
2013-12-03 18:48       ` Nicolas Schichan
2013-12-03 20:57     ` Leigh Brown
2013-12-03 22:45       ` Sebastian Hesselbarth
2013-12-03 23:20         ` Leigh Brown
2013-12-03 23:17           ` Sebastian Hesselbarth
2013-12-03 23:38             ` Leigh Brown
2013-12-03 23:42               ` Russell King - ARM Linux
2013-12-04 11:40                 ` Nicolas Schichan
2013-12-16 18:07                 ` Nicolas Schichan
2013-12-16 18:28                   ` Leigh Brown
2013-12-17 13:49                     ` Nicolas Schichan
2013-12-16 18:48                   ` Russell King - ARM Linux
2013-12-03 23:45               ` Sebastian Hesselbarth
2013-12-03 13:16   ` [PATCH] net: mvmdio: fix wait_event_timeout() being called with a 1 jiffy timeout Nicolas Schichan
2013-12-03 13:34     ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).