Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e1a491429e7f9b6fb608d9f173e5807fba053d5b
Commit:     e1a491429e7f9b6fb608d9f173e5807fba053d5b
Parent:     0cc5e2e7c3edd8b45775f50c74738d61b43ac5e8
Author:     David Brownell <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 2 02:36:53 2008 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Feb 21 15:38:51 2008 -0800

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/host/ehci-hcd.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 4caa6a8..d64887b 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)
                /* reschedule QH iff another request is queued */
                if (!list_empty (&qh->qtd_list)
                                && HC_IS_RUNNING (hcd->state)) {
-                       int schedule_status;
-
-                       schedule_status = qh_schedule (ehci, qh);
-                       spin_unlock_irqrestore (&ehci->lock, flags);
-
-                       if (schedule_status != 0) {
-                               // shouldn't happen often, but ...
-                               // FIXME kill those tds' urbs
-                               err ("can't reschedule qh %p, err %d",
-                                       qh, schedule_status);
-                       }
-                       return status;
+                       rc = qh_schedule(ehci, qh);
+
+                       /* An error here likely indicates handshake failure
+                        * or no space left in the schedule.  Neither fault
+                        * should happen often ...
+                        *
+                        * FIXME kill the now-dysfunctional queued urbs
+                        */
+                       if (rc != 0)
+                               ehci_err(ehci,
+                                       "can't reschedule qh %p, err %d",
+                                       qh, rc);
                }
                break;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to