aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2008-02-02 05:36:53 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-21 18:38:51 -0500
commite1a491429e7f9b6fb608d9f173e5807fba053d5b (patch)
treec2dcf73d9dc390957499d634bb02b2b30a1bf951 /drivers/usb
parent0cc5e2e7c3edd8b45775f50c74738d61b43ac5e8 (diff)
USB: fix previous sparse fix which was incorrect
The previous fix for a "sparse" warning in ehci_urb_dequeue() was incorrect. After rescheduling interrupt transfers it returned the URB's completion status, not status for the dequeue operation itself. This patch resolves that issue, cleans up the code in the reschedule path, and shrinks the object code by a dozen bytes. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ehci-hcd.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 4caa6a8b9a37..d64887bfa6af 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -862,18 +862,18 @@ static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
862 /* reschedule QH iff another request is queued */ 862 /* reschedule QH iff another request is queued */
863 if (!list_empty (&qh->qtd_list) 863 if (!list_empty (&qh->qtd_list)
864 && HC_IS_RUNNING (hcd->state)) { 864 && HC_IS_RUNNING (hcd->state)) {
865 int schedule_status; 865 rc = qh_schedule(ehci, qh);
866 866
867 schedule_status = qh_schedule (ehci, qh); 867 /* An error here likely indicates handshake failure
868 spin_unlock_irqrestore (&ehci->lock, flags); 868 * or no space left in the schedule. Neither fault
869 869 * should happen often ...
870 if (schedule_status != 0) { 870 *
871 // shouldn't happen often, but ... 871 * FIXME kill the now-dysfunctional queued urbs
872 // FIXME kill those tds' urbs 872 */
873 err ("can't reschedule qh %p, err %d", 873 if (rc != 0)
874 qh, schedule_status); 874 ehci_err(ehci,
875 } 875 "can't reschedule qh %p, err %d",
876 return status; 876 qh, rc);
877 } 877 }
878 break; 878 break;
879 879