Commit 20f758ca authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: ehci requeue revisit

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3aaeadd6
......@@ -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 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
intr_deschedule (ehci, qh);
(void) qh_schedule (ehci, qh);
} else
start_unlink_async (ehci, qh);
unlink_async (ehci, qh);
break;
/* otherwise, unlink already started */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment