aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/hub.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-27 12:32:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-27 12:32:20 -0400
commit1993cbf06aa95c0fcf080f2e858c116306b6c29e (patch)
tree48fed02d854e4a1133fcd380da5627401e6292d4 /drivers/usb/core/hub.c
parent7ff5000268355c63dc948ecb01f4de17987586e5 (diff)
parent573a094873752d225041b1059a662eca013a54f4 (diff)
Merge tag 'usb-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are a number of USB driver fixes for reported problems for 4.17-rc3. The "largest" here is a number of phy core changes for reported problems with the -rc1 release. There's also the usual musb and xhci fixes, as well as new device id updates. There are also some usbip fixes for reported problems as more people start to use that code with containers. All of these have been in linux-next with no reported issues, except the last few new device ids, which are "obviously correct" :)" * tag 'usb-4.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits) USB: musb: dsps: drop duplicate phy initialisation USB: musb: host: prevent core phy initialisation usb: core: phy: add the SPDX-License-Identifier and include guard xhci: Fix Kernel oops in xhci dbgtty usb: select USB_COMMON for usb role switch config usb: core: phy: add missing forward declaration for "struct device" usb: core: phy: make it a no-op if CONFIG_GENERIC_PHY is disabled usb: core: use phy_exit during suspend if wake up is not supported usb: core: split usb_phy_roothub_{init,alloc} usb: core: phy: fix return value of usb_phy_roothub_exit() usb: typec: ucsi: Increase command completion timeout value Revert "xhci: plat: Register shutdown for xhci_plat" usb: core: Add quirk for HP v222w 16GB Mini Documentation: typec.rst: Use literal-block element with ascii art usb: typec: ucsi: fix tracepoint related build error usbip: usbip_event: fix to not print kernel pointer address usbip: usbip_host: fix to hold parent lock for device_attach() calls usbip: vhci_hcd: Fix usb device and sockfd leaks usbip: vhci_hcd: check rhport before using in vhci_hub_control() USB: Increment wakeup count on remote wakeup. ...
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r--drivers/usb/core/hub.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index f6ea16e9f6bb..aa9968d90a48 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -653,12 +653,17 @@ void usb_wakeup_notification(struct usb_device *hdev,
653 unsigned int portnum) 653 unsigned int portnum)
654{ 654{
655 struct usb_hub *hub; 655 struct usb_hub *hub;
656 struct usb_port *port_dev;
656 657
657 if (!hdev) 658 if (!hdev)
658 return; 659 return;
659 660
660 hub = usb_hub_to_struct_hub(hdev); 661 hub = usb_hub_to_struct_hub(hdev);
661 if (hub) { 662 if (hub) {
663 port_dev = hub->ports[portnum - 1];
664 if (port_dev && port_dev->child)
665 pm_wakeup_event(&port_dev->child->dev, 0);
666
662 set_bit(portnum, hub->wakeup_bits); 667 set_bit(portnum, hub->wakeup_bits);
663 kick_hub_wq(hub); 668 kick_hub_wq(hub);
664 } 669 }
@@ -3434,8 +3439,11 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
3434 3439
3435 /* Skip the initial Clear-Suspend step for a remote wakeup */ 3440 /* Skip the initial Clear-Suspend step for a remote wakeup */
3436 status = hub_port_status(hub, port1, &portstatus, &portchange); 3441 status = hub_port_status(hub, port1, &portstatus, &portchange);
3437 if (status == 0 && !port_is_suspended(hub, portstatus)) 3442 if (status == 0 && !port_is_suspended(hub, portstatus)) {
3443 if (portchange & USB_PORT_STAT_C_SUSPEND)
3444 pm_wakeup_event(&udev->dev, 0);
3438 goto SuspendCleared; 3445 goto SuspendCleared;
3446 }
3439 3447
3440 /* see 7.1.7.7; affects power usage, but not budgeting */ 3448 /* see 7.1.7.7; affects power usage, but not budgeting */
3441 if (hub_is_superspeed(hub->hdev)) 3449 if (hub_is_superspeed(hub->hdev))