Skip to content

Commit

Permalink
USB: ehci: handle large bulk URBs correctly (again)
Browse files Browse the repository at this point in the history
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 14c04c0), 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>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Misha Zhilin authored and Greg Kroah-Hartman committed Mar 4, 2008
1 parent 14f3546 commit b5f7a0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/host/ehci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,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 */
Expand Down

0 comments on commit b5f7a0e

Please sign in to comment.