]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: ehci: handle large bulk URBs correctly (again)
authorMisha Zhilin <misha@epiphan.com>
Wed, 5 Mar 2008 00:50:27 +0000 (00:50 +0000)
committerChris Wright <chrisw@sous-sol.org>
Mon, 24 Mar 2008 18:47:36 +0000 (11:47 -0700)
commit: b5f7a0ec11694e60c99d682549dfaf8a03d7ad97

USB: ehci: Fixes completion for multi-qtd URB the short read case

When use of urb->status in the EHCI driver was reworked last August
(commit 14c04c0f88f228fee1f412be91d6edcb935c78aa), a bug was inserted
in the handling of early completion for bulk transactions that need
more than one qTD (e.g. more than 20KB in one URB).

This patch resolves that problem by ensuring that the early completion
status is preserved until the URB is handed back to its submitter,
instead of resetting it after each qTD.

Signed-off-by: Misha Zhilin <misha@epiphan.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/usb/host/ehci-q.c

index b10f39c047e944848f3ac2aa4067e820d2f5df90..d1df9e9c5897b895e2fe8e3f2cf77d6a2b281534 100644 (file)
@@ -315,10 +315,10 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
                        if (likely (last->urb != urb)) {
                                ehci_urb_done(ehci, last->urb, last_status);
                                count++;
+                               last_status = -EINPROGRESS;
                        }
                        ehci_qtd_free (ehci, last);
                        last = NULL;
-                       last_status = -EINPROGRESS;
                }
 
                /* ignore urbs submitted during completions we reported */