diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2007-08-24 15:42:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:23 -0400 |
commit | 4a00027dcb088bf90fa8fb14a7e8ba3506d78f22 (patch) | |
tree | 992b3dbda7b950b8906ac4751e43a28fd15e2e5d /drivers/usb/host/isp116x-hcd.c | |
parent | 9347d51c52afcf1a77d2104f162cf8a085624c83 (diff) |
USB: Eliminate urb->status usage!
This patch (as979) removes the last vestiges of urb->status from the
host controller drivers and the root-hub emulator. Now the field
doesn't get set until just before the URB's completion routine is
called.
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/isp116x-hcd.c')
-rw-r--r-- | drivers/usb/host/isp116x-hcd.c | 15 |
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 | */ |
279 | static void finish_request(struct isp116x *isp116x, struct isp116x_ep *ep, | 279 | static 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; |