diff options
author | Bruno Morelli <bruno@evidence.eu.com> | 2012-07-30 09:26:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-10 14:49:13 -0400 |
commit | 4840ae17ba7e21f2932120383a2c9a0f30e66123 (patch) | |
tree | 87bdc9d8f087d89f6f8d078ff10f1516067be920 | |
parent | 872c495dd0f9d1f48814a8ee80c2c7b3b7c3b4d9 (diff) |
USB: isp1362-hcd.c: usb message always saved in case of underrun
The usb message must be saved also in case the USB endpoint is not a
control endpoint (i.e., "endpoint 0"), otherwise in some circumstances
we don't have a payload in case of error.
The patch has been created by tracing with usbmon the different error
messages generated by this driver with respect to the ehci-hcd driver.
Signed-off-by: Bruno Morelli <bruno@evidence.eu.com>
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Tested-by: Bruno Morelli <bruno@evidence.eu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/isp1362-hcd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c index 2ed112d3e159..256326322cfd 100644 --- a/drivers/usb/host/isp1362-hcd.c +++ b/drivers/usb/host/isp1362-hcd.c | |||
@@ -543,12 +543,12 @@ static void postproc_ep(struct isp1362_hcd *isp1362_hcd, struct isp1362_ep *ep) | |||
543 | usb_pipein(urb->pipe) ? "IN" : "OUT", ep->nextpid, | 543 | usb_pipein(urb->pipe) ? "IN" : "OUT", ep->nextpid, |
544 | short_ok ? "" : "not_", | 544 | short_ok ? "" : "not_", |
545 | PTD_GET_COUNT(ptd), ep->maxpacket, len); | 545 | PTD_GET_COUNT(ptd), ep->maxpacket, len); |
546 | /* save the data underrun error code for later and | ||
547 | * proceed with the status stage | ||
548 | */ | ||
549 | urb->actual_length += PTD_GET_COUNT(ptd); | ||
546 | if (usb_pipecontrol(urb->pipe)) { | 550 | if (usb_pipecontrol(urb->pipe)) { |
547 | ep->nextpid = USB_PID_ACK; | 551 | ep->nextpid = USB_PID_ACK; |
548 | /* save the data underrun error code for later and | ||
549 | * proceed with the status stage | ||
550 | */ | ||
551 | urb->actual_length += PTD_GET_COUNT(ptd); | ||
552 | BUG_ON(urb->actual_length > urb->transfer_buffer_length); | 552 | BUG_ON(urb->actual_length > urb->transfer_buffer_length); |
553 | 553 | ||
554 | if (urb->status == -EINPROGRESS) | 554 | if (urb->status == -EINPROGRESS) |