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

USB: Update USB default wakeup settings

This patch (as1486) implements the kernel's new wakeup policy for USB
host controllers.  Since they don't generate wakeup requests on their
but merely forward requests from their root hubs toward the CPU, they
should be enabled for wakeup by default.

Also, to be compliant with both the old and new policies, root hubs
should not be enabled for remote wakeup by default.  Userspace must
enable it explicitly if it is desired.
Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 0cc47d54
...@@ -2429,7 +2429,7 @@ int usb_add_hcd(struct usb_hcd *hcd, ...@@ -2429,7 +2429,7 @@ int usb_add_hcd(struct usb_hcd *hcd,
* but drivers can override it in reset() if needed, along with * but drivers can override it in reset() if needed, along with
* recording the overall controller's system wakeup capability. * recording the overall controller's system wakeup capability.
*/ */
device_init_wakeup(&rhdev->dev, 1); device_set_wakeup_capable(&rhdev->dev, 1);
/* HCD_FLAG_RH_RUNNING doesn't matter until the root hub is /* HCD_FLAG_RH_RUNNING doesn't matter until the root hub is
* registered. But since the controller can die at any time, * registered. But since the controller can die at any time,
...@@ -2478,6 +2478,13 @@ int usb_add_hcd(struct usb_hcd *hcd, ...@@ -2478,6 +2478,13 @@ int usb_add_hcd(struct usb_hcd *hcd,
} }
if (hcd->uses_new_polling && HCD_POLL_RH(hcd)) if (hcd->uses_new_polling && HCD_POLL_RH(hcd))
usb_hcd_poll_rh_status(hcd); usb_hcd_poll_rh_status(hcd);
/*
* Host controllers don't generate their own wakeup requests;
* they only forward requests from the root hub. Therefore
* controllers should always be enabled for remote wakeup.
*/
device_wakeup_enable(hcd->self.controller);
return retval; return retval;
error_create_attr_group: error_create_attr_group:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册