mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Ohci-hcd: fix endless loop
@ 2004-11-25 18:17 Colin Leroy
  2004-11-26 16:38 ` [linux-usb-devel] " David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: Colin Leroy @ 2004-11-25 18:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Benjamin Herrenschmidt, Greg KH

Hi, 

Following patch fixes an endless loop that happens after having
slept and resumed my iBook with a linux-wlan-ng controller plugged in,
removed the stick and plugged it back (getting "IRQ lossage" message).

Signed-off-by: Colin Leroy <colin@colino.net>
--- a/drivers/usb/host/ohci-hcd.c	2004-11-25 19:00:25.000000000 +0100
+++ b/drivers/usb/host/ohci-hcd.c	2004-11-25 19:08:59.000000000 +0100
@@ -375,6 +375,11 @@
 		spin_unlock_irqrestore (&ohci->lock, flags);
 		set_current_state (TASK_UNINTERRUPTIBLE);
 		schedule_timeout (1);
+		if (limit-- < -1000) {
+			ohci_warn (ohci, "Couldn't recover\n");
+			ohci_restart(ohci);
+			goto bail;
+		}
 		goto rescan;
 	case ED_IDLE:		/* fully unlinked */
 		if (list_empty (&ed->td_list)) {
@@ -396,6 +401,7 @@
 	dev->ep [epnum] = NULL;
 done:
 	spin_unlock_irqrestore (&ohci->lock, flags);
+bail:
 	return;
 }
 

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

end of thread, other threads:[~2004-11-27  6:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-25 18:17 [PATCH] Ohci-hcd: fix endless loop Colin Leroy
2004-11-26 16:38 ` [linux-usb-devel] " David Brownell
2004-11-26 16:54   ` Colin Leroy
2004-11-26 17:21     ` David Brownell
2004-11-26 22:07   ` Benjamin Herrenschmidt

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

Powered by JetHome