aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/sl811-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/sl811-hcd.c')
-rw-r--r--drivers/usb/host/sl811-hcd.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 15a93f946afd..e90953a9c9fb 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -438,7 +438,6 @@ static void finish_request(
438 spin_lock(&urb->lock); 438 spin_lock(&urb->lock);
439 if (urb->status == -EINPROGRESS) 439 if (urb->status == -EINPROGRESS)
440 urb->status = status; 440 urb->status = status;
441 urb->hcpriv = NULL;
442 spin_unlock(&urb->lock); 441 spin_unlock(&urb->lock);
443 442
444 usb_hcd_unlink_urb_from_ep(sl811_to_hcd(sl811), urb); 443 usb_hcd_unlink_urb_from_ep(sl811_to_hcd(sl811), urb);
@@ -545,17 +544,10 @@ done(struct sl811 *sl811, struct sl811h_ep *ep, u8 bank)
545 sl811_read_buf(sl811, SL811HS_PACKET_BUF(bank == 0), 544 sl811_read_buf(sl811, SL811HS_PACKET_BUF(bank == 0),
546 buf, len); 545 buf, len);
547 usb_dotoggle(udev, ep->epnum, 0); 546 usb_dotoggle(udev, ep->epnum, 0);
548 if (urb->actual_length == urb->transfer_buffer_length) 547 if (urb->actual_length == urb->transfer_buffer_length
548 || len < ep->maxpacket)
549 urbstat = 0; 549 urbstat = 0;
550 else if (len < ep->maxpacket) { 550 if (usb_pipecontrol(urb->pipe) && urbstat == 0) {
551 if (urb->transfer_flags & URB_SHORT_NOT_OK)
552 urbstat = -EREMOTEIO;
553 else
554 urbstat = 0;
555 }
556 if (usb_pipecontrol(urb->pipe)
557 && (urbstat == -EREMOTEIO
558 || urbstat == 0)) {
559 551
560 /* NOTE if the status stage STALLs (why?), 552 /* NOTE if the status stage STALLs (why?),
561 * this reports the wrong urb status. 553 * this reports the wrong urb status.