ChangeSet 1.2223.2.7, 2004/11/24 15:13:42-08:00, [EMAIL PROTECTED]

[PATCH] USB: "sparse -Wcontext" and USB HCDs ...

This adds "sparse -Wcontext" annotations to the main HCDs, reflecting that
they all need to drop their (schedule) lock while issuing URB completion
callbacks.  (Some completion callbacks will resubmit that URB, relying on
that to keep the endpoint queue from emptying and getting descheduled.)

Signed-off-by: David Brownell <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/host/ehci-q.c   |    2 ++
 drivers/usb/host/ohci-q.c   |    2 ++
 drivers/usb/host/uhci-hcd.c |    5 ++++-
 3 files changed, 8 insertions(+), 1 deletion(-)


diff -Nru a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
--- a/drivers/usb/host/ehci-q.c 2004-11-30 15:44:08 -08:00
+++ b/drivers/usb/host/ehci-q.c 2004-11-30 15:44:08 -08:00
@@ -175,6 +175,8 @@
 
 static void
 ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb, struct pt_regs *regs)
+__releases(ehci->lock)
+__acquires(ehci->lock)
 {
        if (likely (urb->hcpriv != 0)) {
                struct ehci_qh  *qh = (struct ehci_qh *) urb->hcpriv;
diff -Nru a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
--- a/drivers/usb/host/ohci-q.c 2004-11-30 15:44:08 -08:00
+++ b/drivers/usb/host/ohci-q.c 2004-11-30 15:44:08 -08:00
@@ -35,6 +35,8 @@
  */
 static void
 finish_urb (struct ohci_hcd *ohci, struct urb *urb, struct pt_regs *regs)
+__releases(ohci->lock)
+__acquires(ohci->lock)
 {
        // ASSERT (urb->hcpriv != 0);
 
diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c       2004-11-30 15:44:08 -08:00
+++ b/drivers/usb/host/uhci-hcd.c       2004-11-30 15:44:08 -08:00
@@ -1602,7 +1602,10 @@
        }
 }
 
-static void uhci_finish_urb(struct usb_hcd *hcd, struct urb *urb, struct 
pt_regs *regs)
+static void
+uhci_finish_urb(struct usb_hcd *hcd, struct urb *urb, struct pt_regs *regs)
+__releases(uhci->schedule_lock)
+__acquires(uhci->schedule_lock)
 {
        struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to