aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp116x-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/isp116x-hcd.c')
-rw-r--r--drivers/usb/host/isp116x-hcd.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 35b3507ff401..c27417f5b9d8 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -277,7 +277,7 @@ static void preproc_atl_queue(struct isp116x *isp116x)
277 processed urbs. 277 processed urbs.
278*/ 278*/
279static void finish_request(struct isp116x *isp116x, struct isp116x_ep *ep, 279static void finish_request(struct isp116x *isp116x, struct isp116x_ep *ep,
280 struct urb *urb) 280 struct urb *urb, int status)
281__releases(isp116x->lock) __acquires(isp116x->lock) 281__releases(isp116x->lock) __acquires(isp116x->lock)
282{ 282{
283 unsigned i; 283 unsigned i;
@@ -291,7 +291,7 @@ __releases(isp116x->lock) __acquires(isp116x->lock)
291 291
292 usb_hcd_unlink_urb_from_ep(isp116x_to_hcd(isp116x), urb); 292 usb_hcd_unlink_urb_from_ep(isp116x_to_hcd(isp116x), urb);
293 spin_unlock(&isp116x->lock); 293 spin_unlock(&isp116x->lock);
294 usb_hcd_giveback_urb(isp116x_to_hcd(isp116x), urb); 294 usb_hcd_giveback_urb(isp116x_to_hcd(isp116x), urb, status);
295 spin_lock(&isp116x->lock); 295 spin_lock(&isp116x->lock);
296 296
297 /* take idle endpoints out of the schedule */ 297 /* take idle endpoints out of the schedule */
@@ -453,13 +453,8 @@ static void postproc_atl_queue(struct isp116x *isp116x)
453 } 453 }
454 454
455 done: 455 done:
456 if (status != -EINPROGRESS) { 456 if (status != -EINPROGRESS || urb->unlinked)
457 spin_lock(&urb->lock); 457 finish_request(isp116x, ep, urb, status);
458 urb->status = status;
459 spin_unlock(&urb->lock);
460 }
461 if (urb->status != -EINPROGRESS || urb->unlinked)
462 finish_request(isp116x, ep, urb);
463 } 458 }
464} 459}
465 460
@@ -853,7 +848,7 @@ static int isp116x_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
853 } 848 }
854 849
855 if (urb) 850 if (urb)
856 finish_request(isp116x, ep, urb); 851 finish_request(isp116x, ep, urb, status);
857 done: 852 done:
858 spin_unlock_irqrestore(&isp116x->lock, flags); 853 spin_unlock_irqrestore(&isp116x->lock, flags);
859 return rc; 854 return rc;