Skip to content

Commit

Permalink
xhci: Return correct number of tranferred bytes for stalled control e…
Browse files Browse the repository at this point in the history
…ndpoints

Fix the xhci driver from bluntly setting the transferred length to 0 if
we get a STALL on anything else than the data stage of a control transfer.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Mathias Nyman authored and Greg Kroah-Hartman committed May 31, 2015
1 parent 41485a9 commit 22ae47e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/host/xhci-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
td->urb->actual_length =
td->urb->transfer_buffer_length -
EVENT_TRB_LEN(le32_to_cpu(event->transfer_len));
else
else if (!td->urb_length_set)
td->urb->actual_length = 0;

return finish_td(xhci, td, event_trb, event, ep, status, false);
Expand Down

0 comments on commit 22ae47e

Please sign in to comment.