diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-08-21 15:39:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:19 -0400 |
commit | b0d9efba3ec53468984aecef8eeaf079089f2e5a (patch) | |
tree | a372d053daddc5ff041949b80bab347317a76938 /drivers/usb/host/u132-hcd.c | |
parent | ee7d1f3f0c32d8abe9627aa73dc62ee5bf2daf7f (diff) |
USB: centralize -EREMOTEIO handling
This patch (as969) continues the ongoing changes to the way HCDs
report URB statuses. The programming interface has been simplified by
making usbcore responsible for clearing urb->hcpriv and for setting
-EREMOTEIO status when an URB with the URB_SHORT_NOT_OK flag ends up
as a short transfer.
By moving the work out of the HCDs, this removes a fair amount of
repeated code.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
CC: Olav Kongas <ok@artecdesign.ee>
CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
CC: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/u132-hcd.c')
-rw-r--r-- | drivers/usb/host/u132-hcd.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c index c87660b5edc3..1381275d448f 100644 --- a/drivers/usb/host/u132-hcd.c +++ b/drivers/usb/host/u132-hcd.c | |||
@@ -519,7 +519,6 @@ static void u132_hcd_giveback_urb(struct u132 *u132, struct u132_endp *endp, | |||
519 | struct usb_hcd *hcd = u132_to_hcd(u132); | 519 | struct usb_hcd *hcd = u132_to_hcd(u132); |
520 | urb->error_count = 0; | 520 | urb->error_count = 0; |
521 | urb->status = status; | 521 | urb->status = status; |
522 | urb->hcpriv = NULL; | ||
523 | spin_lock_irqsave(&endp->queue_lock.slock, irqs); | 522 | spin_lock_irqsave(&endp->queue_lock.slock, irqs); |
524 | usb_hcd_unlink_urb_from_ep(hcd, urb); | 523 | usb_hcd_unlink_urb_from_ep(hcd, urb); |
525 | endp->queue_next += 1; | 524 | endp->queue_next += 1; |
@@ -560,7 +559,6 @@ static void u132_hcd_abandon_urb(struct u132 *u132, struct u132_endp *endp, | |||
560 | struct usb_hcd *hcd = u132_to_hcd(u132); | 559 | struct usb_hcd *hcd = u132_to_hcd(u132); |
561 | urb->error_count = 0; | 560 | urb->error_count = 0; |
562 | urb->status = status; | 561 | urb->status = status; |
563 | urb->hcpriv = NULL; | ||
564 | spin_lock_irqsave(&endp->queue_lock.slock, irqs); | 562 | spin_lock_irqsave(&endp->queue_lock.slock, irqs); |
565 | usb_hcd_unlink_urb_from_ep(hcd, urb); | 563 | usb_hcd_unlink_urb_from_ep(hcd, urb); |
566 | endp->queue_next += 1; | 564 | endp->queue_next += 1; |
@@ -2430,7 +2428,6 @@ static int dequeue_from_overflow_chain(struct u132 *u132, | |||
2430 | list_del(scan); | 2428 | list_del(scan); |
2431 | endp->queue_size -= 1; | 2429 | endp->queue_size -= 1; |
2432 | urb->error_count = 0; | 2430 | urb->error_count = 0; |
2433 | urb->hcpriv = NULL; | ||
2434 | usb_hcd_giveback_urb(hcd, urb); | 2431 | usb_hcd_giveback_urb(hcd, urb); |
2435 | return 0; | 2432 | return 0; |
2436 | } else | 2433 | } else |
@@ -2472,7 +2469,6 @@ static int u132_endp_urb_dequeue(struct u132 *u132, struct u132_endp *endp, | |||
2472 | endp->edset_flush = 1; | 2469 | endp->edset_flush = 1; |
2473 | u132_endp_queue_work(u132, endp, 0); | 2470 | u132_endp_queue_work(u132, endp, 0); |
2474 | spin_unlock_irqrestore(&endp->queue_lock.slock, irqs); | 2471 | spin_unlock_irqrestore(&endp->queue_lock.slock, irqs); |
2475 | urb->hcpriv = NULL; | ||
2476 | return 0; | 2472 | return 0; |
2477 | } else { | 2473 | } else { |
2478 | spin_unlock_irqrestore(&endp->queue_lock.slock, irqs); | 2474 | spin_unlock_irqrestore(&endp->queue_lock.slock, irqs); |
@@ -2517,7 +2513,6 @@ static int u132_endp_urb_dequeue(struct u132 *u132, struct u132_endp *endp, | |||
2517 | irqs); | 2513 | irqs); |
2518 | kfree(urbq); | 2514 | kfree(urbq); |
2519 | } urb->error_count = 0; | 2515 | } urb->error_count = 0; |
2520 | urb->hcpriv = NULL; | ||
2521 | usb_hcd_giveback_urb(hcd, urb); | 2516 | usb_hcd_giveback_urb(hcd, urb); |
2522 | return 0; | 2517 | return 0; |
2523 | } else if (list_empty(&endp->urb_more)) { | 2518 | } else if (list_empty(&endp->urb_more)) { |