From: nschichan@freebox.fr (Nicolas Schichan)
To: linux-arm-kernel@lists.infradead.org
Subject: Spurious timeouts in mvmdio
Date: Mon, 02 Dec 2013 16:15:54 +0100 [thread overview]
Message-ID: <529CA42A.3040504@freebox.fr> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Schichan <nschichan@freebox.fr>
To: LKML <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: "David S. Miller" <davem@davemloft.net>,
Florian Fainelli <florian@openwrt.org>,
Leigh Brown <leigh@solinno.co.uk>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Spurious timeouts in mvmdio
Date: Mon, 02 Dec 2013 16:15:54 +0100 [thread overview]
Message-ID: <529CA42A.3040504@freebox.fr> (raw)
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
next reply other threads:[~2013-12-02 15:15 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 15:15 Nicolas Schichan [this message]
2013-12-02 15:15 ` Spurious timeouts in mvmdio Nicolas Schichan
2013-12-03 12:23 ` Jason Cooper
2013-12-03 12:23 ` Jason Cooper
2013-12-03 12:40 ` Russell King - ARM Linux
2013-12-03 12:40 ` Russell King - ARM Linux
2013-12-03 13:43 ` Jason Cooper
2013-12-03 13:43 ` Jason Cooper
2013-12-03 18:48 ` Nicolas Schichan
2013-12-03 18:48 ` Nicolas Schichan
2013-12-03 20:57 ` Leigh Brown
2013-12-03 20:57 ` Leigh Brown
2013-12-03 22:45 ` Sebastian Hesselbarth
2013-12-03 22:45 ` Sebastian Hesselbarth
2013-12-03 23:20 ` Leigh Brown
2013-12-03 23:20 ` Leigh Brown
2013-12-03 23:17 ` Sebastian Hesselbarth
2013-12-03 23:17 ` Sebastian Hesselbarth
2013-12-03 23:38 ` Leigh Brown
2013-12-03 23:38 ` Leigh Brown
2013-12-03 23:42 ` Russell King - ARM Linux
2013-12-03 23:42 ` Russell King - ARM Linux
2013-12-04 11:40 ` Nicolas Schichan
2013-12-04 11:40 ` Nicolas Schichan
2013-12-16 18:07 ` Nicolas Schichan
2013-12-16 18:07 ` Nicolas Schichan
2013-12-16 18:28 ` Leigh Brown
2013-12-16 18:28 ` Leigh Brown
2013-12-17 13:49 ` Nicolas Schichan
2013-12-17 13:49 ` Nicolas Schichan
2013-12-16 18:48 ` Russell King - ARM Linux
2013-12-16 18:48 ` Russell King - ARM Linux
2013-12-03 23:45 ` Sebastian Hesselbarth
2013-12-03 23:45 ` Sebastian Hesselbarth
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:16 ` Nicolas Schichan
2013-12-03 13:34 ` Russell King - ARM Linux
2013-12-03 13:34 ` Russell King - ARM Linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=529CA42A.3040504@freebox.fr \
--to=nschichan@freebox.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.