提交 b446b96f 编写于 作者: A Alan Stern 提交者: Greg Kroah-Hartman

UHCI: hub_status_data should indicate if ports are resuming

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: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a448e4dc
...@@ -196,11 +196,12 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf) ...@@ -196,11 +196,12 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
status = get_hub_status_data(uhci, buf); status = get_hub_status_data(uhci, buf);
switch (uhci->rh_state) { switch (uhci->rh_state) {
case UHCI_RH_SUSPENDING:
case UHCI_RH_SUSPENDED: case UHCI_RH_SUSPENDED:
/* if port change, ask to be resumed */ /* 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); usb_hcd_resume_root_hub(hcd);
}
break; break;
case UHCI_RH_AUTO_STOPPED: case UHCI_RH_AUTO_STOPPED:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册