mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] usb: ehci-hcd: use is_timeout_non_interruptible()
@ 2015-09-09 12:56 Peter Mamonov
  2015-09-10  7:17 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Mamonov @ 2015-09-09 12:56 UTC (permalink / raw)
  To: barebox, s.hauer; +Cc: Peter Mamonov

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

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

* Re: [PATCH] usb: ehci-hcd: use is_timeout_non_interruptible()
  2015-09-09 12:56 [PATCH] usb: ehci-hcd: use is_timeout_non_interruptible() Peter Mamonov
@ 2015-09-10  7:17 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-09-10  7:17 UTC (permalink / raw)
  To: Peter Mamonov; +Cc: barebox

On Wed, Sep 09, 2015 at 03:56:39PM +0300, Peter Mamonov wrote:
> 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>

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

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

end of thread, other threads:[~2015-09-10  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09 12:56 [PATCH] usb: ehci-hcd: use is_timeout_non_interruptible() Peter Mamonov
2015-09-10  7:17 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox