]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] USB: ehci requeue revisit
authorDavid Brownell <david-b@pacbell.net>
Wed, 16 Feb 2005 06:27:17 +0000 (22:27 -0800)
committerGreg Kroah-Hartman <gregkh@kernel.bkbits.net>
Wed, 16 Feb 2005 06:27:17 +0000 (22:27 -0800)
This gets rid of a bug found in some IRQ handling logic, after tripping
a debug assertion.  Basically, a recent patch called the wrong routine to
unlink a QH.  Net result, it wasn't allowing for the case that some other
QH was already being unlinked.  This patch uses the correct routine; the
names are confusingly similar, and the effect is often identical.

The consequence of using the wrong routine was that the driver could
lose one of the pending unlinks (probably wedging some activity) and
treat the other one as completed before it was safe to do so (which
probably wouldn't oops, but could cause other nasty corruption).

From: Brian Murphy <brian@murphy.dk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-q.c

index 42b4891d83f8de0fb6d2400050a98aa8979fa5dd..b284c4c896af851e564b1377cd4567ad4c8e29ff 100644 (file)
@@ -267,6 +267,7 @@ __acquires(ehci->lock)
 }
 
 static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
+static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
 
 static void intr_deschedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
 static int qh_schedule (struct ehci_hcd *ehci, struct ehci_qh *qh);
@@ -430,7 +431,7 @@ halt:
                                intr_deschedule (ehci, qh);
                                (void) qh_schedule (ehci, qh);
                        } else
-                               start_unlink_async (ehci, qh);
+                               unlink_async (ehci, qh);
                        break;
                /* otherwise, unlink already started */
                }