summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-mem.c
diff options
context:
space:
mode:
authorKarsten Wiese <fzu@wemgehoertderstaat.de>2009-02-09 03:07:58 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-28 01:40:50 +0300
commit9aa09d2f8f4bc440d6db1c3414d4009642875240 (patch)
tree11b8735a5ddb24fcb4b810b9af3959a8aae6a1ae /drivers/usb/host/ehci-mem.c
parent9a6e184c804b33a2c2ea974efcd3c9798d30cb39 (diff)
downloadlinux-9aa09d2f8f4bc440d6db1c3414d4009642875240.tar.xz
USB: EHCI: slow down ITD reuse
Currently ITDs are immediately recycled whenever their URB completes. However, EHCI hardware can sometimes remember some ITD state. This means that when the ITD is reused before end-of-frame it may sometimes cause the hardware to reference bogus state. This patch defers reusing such ITDs by moving them into a new ehci member cached_itd_list. ITDs resting in cached_itd_list are moved back into their stream's free_list once scan_periodic() detects that the active frame has elapsed. This makes the snd_usb_us122l driver (in kernel since .28) work right when it's hooked up through EHCI. [ dbrownell@users.sourceforge.net: comment fixups ] Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Tested-by: Philippe Carriere <philippe-f.carriere@wanadoo.fr> Tested-by: Federico Briata <federicobriata@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-mem.c')
-rw-r--r--drivers/usb/host/ehci-mem.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c
index 0431397836f6..10d52919abbb 100644
--- a/drivers/usb/host/ehci-mem.c
+++ b/drivers/usb/host/ehci-mem.c
@@ -128,6 +128,7 @@ static inline void qh_put (struct ehci_qh *qh)
static void ehci_mem_cleanup (struct ehci_hcd *ehci)
{
+ free_cached_itd_list(ehci);
if (ehci->async)
qh_put (ehci->async);
ehci->async = NULL;