netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Sekhar Nori <nsekhar@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>,
	"David S . Miller" <davem@davemloft.net>,
	linux-omap@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] drivers: net: davinci_mdio: prevent sprious timeout
Date: Tue, 8 May 2018 14:48:56 +0200	[thread overview]
Message-ID: <20180508124856.GA2888@lunn.ch> (raw)
In-Reply-To: <20180508082638.5707-1-nsekhar@ti.com>

On Tue, May 08, 2018 at 01:56:38PM +0530, Sekhar Nori wrote:
> A well timed kernel preemption in the time_after() loop
> in wait_for_idle() can result in a spurious timeout
> error to be returned.
> 
> Fix it by checking for status of hardware before returning
> timeout error.
> 
> Signed-off-by: Sekhar Nori <nsekhar@ti.com>

I've seen this with other drivers as well.

I suggest you make use of readx_poll_timeout(), or one of its
cousins. They get this right.

	 Andrew

  reply	other threads:[~2018-05-08 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  8:26 [PATCH net-next] drivers: net: davinci_mdio: prevent sprious timeout Sekhar Nori
2018-05-08 12:48 ` Andrew Lunn [this message]
2018-05-09 10:44   ` Sekhar Nori

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=20180508124856.GA2888@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.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).