diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2015-05-29 10:01:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-31 02:45:31 -0400 |
commit | 22ae47e65e7c1819e3598b16fcedc469ff97ec58 (patch) | |
tree | 5d56c7841843fa7e9aaf1e4e8caa333ecdff097c | |
parent | 41485a90d573764738a2d096c01133fe30c2ebca (diff) |
xhci: Return correct number of tranferred bytes for stalled control endpoints
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>
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index d7fd5efd3bd5..94416ff70810 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -1934,7 +1934,7 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td, | |||
1934 | td->urb->actual_length = | 1934 | td->urb->actual_length = |
1935 | td->urb->transfer_buffer_length - | 1935 | td->urb->transfer_buffer_length - |
1936 | EVENT_TRB_LEN(le32_to_cpu(event->transfer_len)); | 1936 | EVENT_TRB_LEN(le32_to_cpu(event->transfer_len)); |
1937 | else | 1937 | else if (!td->urb_length_set) |
1938 | td->urb->actual_length = 0; | 1938 | td->urb->actual_length = 0; |
1939 | 1939 | ||
1940 | return finish_td(xhci, td, event_trb, event, ep, status, false); | 1940 | return finish_td(xhci, td, event_trb, event, ep, status, false); |