mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Peter Mamonov <pmamonov@gmail.com>
To: barebox@lists.infradead.org, s.hauer@pengutronix.de
Cc: Peter Mamonov <pmamonov@gmail.com>
Subject: [PATCH] usb: ehci-hcd: use is_timeout_non_interruptible()
Date: Wed,  9 Sep 2015 15:56:39 +0300	[thread overview]
Message-ID: <1441803399-1790-1-git-send-email-pmamonov@gmail.com> (raw)

Use is_timeout_non_interruptible() intead of is_timeout()
to avoid re-entering ehci-hcd functions from pollers,
registered by usb drivers.

Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
---
 drivers/usb/host/ehci-hcd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 1077ac4..7ca77bf 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -137,7 +137,7 @@ static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec)
 		result &= mask;
 		if (result == done)
 			return 0;
-		if (is_timeout(start, usec * USECOND))
+		if (is_timeout_non_interruptible(start, usec * USECOND))
 			return -ETIMEDOUT;
 	}
 }
@@ -357,7 +357,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
 	do {
 		token = hc32_to_cpu(vtd->qt_token);
 		token = hc32_to_cpu(__raw_readl((void *)&vtd->qt_token));
-		if (is_timeout(start, timeout_val)) {
+		if (is_timeout_non_interruptible(start, timeout_val)) {
 			/* Disable async schedule. */
 			cmd = ehci_readl(&ehci->hcor->or_usbcmd);
 			cmd &= ~CMD_ASE;
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-09-09 12:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-09 12:56 Peter Mamonov [this message]
2015-09-10  7:17 ` Sascha Hauer

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=1441803399-1790-1-git-send-email-pmamonov@gmail.com \
    --to=pmamonov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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