Skip to content

Commit

Permalink
UHCI: hub_status_data should indicate if ports are resuming
Browse files Browse the repository at this point in the history
This patch (as1538) causes uhci_hub_status_data() to return a nonzero
value when any port is undergoing a resume transition while the root
hub is suspended.  This will allow usbcore to handle races between
root-hub suspend and port wakeup.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent a448e4d commit b446b96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/host/uhci-hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,12 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
status = get_hub_status_data(uhci, buf);

switch (uhci->rh_state) {
case UHCI_RH_SUSPENDING:
case UHCI_RH_SUSPENDED:
/* if port change, ask to be resumed */
if (status || uhci->resuming_ports)
if (status || uhci->resuming_ports) {
status = 1;
usb_hcd_resume_root_hub(hcd);
}
break;

case UHCI_RH_AUTO_STOPPED:
Expand Down

0 comments on commit b446b96

Please sign in to comment.