|
@@ -653,12 +653,17 @@ void usb_wakeup_notification(struct usb_device *hdev,
|
|
|
unsigned int portnum)
|
|
|
{
|
|
|
struct usb_hub *hub;
|
|
|
+ struct usb_port *port_dev;
|
|
|
|
|
|
if (!hdev)
|
|
|
return;
|
|
|
|
|
|
hub = usb_hub_to_struct_hub(hdev);
|
|
|
if (hub) {
|
|
|
+ port_dev = hub->ports[portnum - 1];
|
|
|
+ if (port_dev && port_dev->child)
|
|
|
+ pm_wakeup_event(&port_dev->child->dev, 0);
|
|
|
+
|
|
|
set_bit(portnum, hub->wakeup_bits);
|
|
|
kick_hub_wq(hub);
|
|
|
}
|
|
@@ -3434,8 +3439,11 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
|
|
|
|
|
|
/* Skip the initial Clear-Suspend step for a remote wakeup */
|
|
|
status = hub_port_status(hub, port1, &portstatus, &portchange);
|
|
|
- if (status == 0 && !port_is_suspended(hub, portstatus))
|
|
|
+ if (status == 0 && !port_is_suspended(hub, portstatus)) {
|
|
|
+ if (portchange & USB_PORT_STAT_C_SUSPEND)
|
|
|
+ pm_wakeup_event(&udev->dev, 0);
|
|
|
goto SuspendCleared;
|
|
|
+ }
|
|
|
|
|
|
/* see 7.1.7.7; affects power usage, but not budgeting */
|
|
|
if (hub_is_superspeed(hub->hdev))
|