Skip to content

Commit

Permalink
USB: Fix runtime wakeup on OHCI
Browse files Browse the repository at this point in the history
At least some OHCI hardware (such as the MCP89) fails to flag any change
in the host status register or the port status registers when receiving
a remote wakeup while in D3 state. This results in the controller being
resumed but no device state change being noticed, at which point the
controller is put back to sleep again. Since there doesn't seem to be any
reliable way to identify the state change, just unconditionally resume the
hub. It'll be put back to sleep in the near future anyway if there are no
active devices attached to it.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable <stable@vger.kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Matthew Garrett authored and Greg Kroah-Hartman committed Oct 18, 2011
1 parent 48e8236 commit a8b43c0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/usb/host/ohci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,7 @@ static void ohci_finish_controller_resume(struct usb_hcd *hcd)
msleep(20);
}

/* Does the root hub have a port wakeup pending? */
if (ohci_readl(ohci, &ohci->regs->intrstatus) &
(OHCI_INTR_RD | OHCI_INTR_RHSC))
usb_hcd_resume_root_hub(hcd);
usb_hcd_resume_root_hub(hcd);
}

/* Carry out polling-, autostop-, and autoresume-related state changes */
Expand Down

0 comments on commit a8b43c0

Please sign in to comment.