Commit 00b8924f authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] USB: Keep root hub status timer running during suspend

Not having heard any complaints about this patch, I'm submitting it.  It
fixes a problem with the root hub status URB implementation; the timer
that controls the root hub polling was not getting reset during a PM
suspend.
parent d6266c68
...@@ -459,7 +459,8 @@ static int rh_status_urb (struct usb_hcd *hcd, struct urb *urb) ...@@ -459,7 +459,8 @@ static int rh_status_urb (struct usb_hcd *hcd, struct urb *urb)
/* rh_timer protected by hcd_data_lock */ /* rh_timer protected by hcd_data_lock */
if (hcd->rh_timer.data if (hcd->rh_timer.data
|| urb->status != -EINPROGRESS || urb->status != -EINPROGRESS
|| urb->transfer_buffer_length < len) { || urb->transfer_buffer_length < len
|| !HCD_IS_RUNNING (hcd->state)) {
dev_dbg (hcd->controller, dev_dbg (hcd->controller,
"not queuing rh status urb, stat %d\n", "not queuing rh status urb, stat %d\n",
urb->status); urb->status);
...@@ -489,11 +490,10 @@ static void rh_report_status (unsigned long ptr) ...@@ -489,11 +490,10 @@ static void rh_report_status (unsigned long ptr)
local_irq_save (flags); local_irq_save (flags);
spin_lock (&urb->lock); spin_lock (&urb->lock);
/* do nothing if the hc is gone or the urb's been unlinked */ /* do nothing if the urb's been unlinked */
if (!urb->dev if (!urb->dev
|| urb->status != -EINPROGRESS || urb->status != -EINPROGRESS
|| (hcd = urb->dev->bus->hcpriv) == 0 || (hcd = urb->dev->bus->hcpriv) == 0) {
|| !HCD_IS_RUNNING (hcd->state)) {
spin_unlock (&urb->lock); spin_unlock (&urb->lock);
local_irq_restore (flags); local_irq_restore (flags);
return; return;
......
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