netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: leigh@solinno.co.uk
Cc: nschichan@freebox.fr, linux@arm.linux.org.uk,
	jason@lakedaemon.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, florian@openwrt.org,
	linux-arm-kernel@lists.infradead.org,
	sebastian.hesselbarth@gmail.com
Subject: Re: [PATCH v2] net: mvmdio: fix interrupt timeout handling
Date: Thu, 19 Dec 2013 19:21:36 -0500 (EST)	[thread overview]
Message-ID: <20131219.192136.1089859619183118911.davem@davemloft.net> (raw)
In-Reply-To: <1387458588-17231-1-git-send-email-leigh@solinno.co.uk>

From: Leigh Brown <leigh@solinno.co.uk>
Date: Thu, 19 Dec 2013 13:09:48 +0000

> 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: Nicolas Schichan <nschichan@freebox.fr>
> Signed-off-by: Leigh Brown <leigh@solinno.co.uk>

Applied, and queued up for -stable.

I wonder how many other wait_event_timeout() users potentially have
this problem.

      parent reply	other threads:[~2013-12-20  0:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 11:13 [PATCH] net: mvmdio: fix interrupt timeout handling Leigh Brown
2013-12-19 11:33 ` Sebastian Hesselbarth
2013-12-19 12:39   ` Leigh Brown
2013-12-19 13:09   ` [PATCH v2] " Leigh Brown
2013-12-19 17:43     ` Jason Gunthorpe
2013-12-19 19:35       ` Leigh Brown
2013-12-20  0:21     ` David Miller [this message]

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=20131219.192136.1089859619183118911.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=florian@openwrt.org \
    --cc=jason@lakedaemon.net \
    --cc=leigh@solinno.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=nschichan@freebox.fr \
    --cc=sebastian.hesselbarth@gmail.com \
    /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 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).