Commit 1005ceef authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent abde5bf4
...@@ -175,6 +175,8 @@ static void qtd_copy_status ( ...@@ -175,6 +175,8 @@ static void qtd_copy_status (
static void static void
ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb, struct pt_regs *regs) 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)) { if (likely (urb->hcpriv != 0)) {
struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv; struct ehci_qh *qh = (struct ehci_qh *) urb->hcpriv;
......
...@@ -35,6 +35,8 @@ static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv) ...@@ -35,6 +35,8 @@ static void urb_free_priv (struct ohci_hcd *hc, urb_priv_t *urb_priv)
*/ */
static void static void
finish_urb (struct ohci_hcd *ohci, struct urb *urb, struct pt_regs *regs) finish_urb (struct ohci_hcd *ohci, struct urb *urb, struct pt_regs *regs)
__releases(ohci->lock)
__acquires(ohci->lock)
{ {
// ASSERT (urb->hcpriv != 0); // ASSERT (urb->hcpriv != 0);
......
...@@ -1602,7 +1602,10 @@ static void uhci_free_pending_tds(struct uhci_hcd *uhci) ...@@ -1602,7 +1602,10 @@ static void uhci_free_pending_tds(struct uhci_hcd *uhci)
} }
} }
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); struct uhci_hcd *uhci = hcd_to_uhci(hcd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment