Loading drivers/usb/core/driver.c +12 −0 Original line number Diff line number Diff line Loading @@ -1463,6 +1463,9 @@ int usb_suspend(struct device *dev, pm_message_t msg) struct usb_device *udev = to_usb_device(dev); int r; if (udev->bus->skip_resume && udev->state == USB_STATE_SUSPENDED) return 0; unbind_no_pm_drivers_interfaces(udev); /* From now on we are sure all drivers support suspend/resume Loading Loading @@ -1499,6 +1502,15 @@ int usb_resume(struct device *dev, pm_message_t msg) struct usb_device *udev = to_usb_device(dev); int status; /* * Some buses would like to keep their devices in suspend * state after system resume. Their resume happen when * a remote wakeup is detected or interface driver start * I/O. */ if (udev->bus->skip_resume) return 0; /* For all calls, take the device back to full power and * tell the PM core in case it was autosuspended previously. * Unbind the interfaces that will need rebinding later, Loading drivers/usb/host/xhci-plat.c +4 −0 Original line number Diff line number Diff line Loading @@ -246,6 +246,8 @@ static int xhci_plat_probe(struct platform_device *pdev) if (!hcd) return -ENOMEM; hcd_to_bus(hcd)->skip_resume = true; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hcd->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(hcd->regs)) { Loading Loading @@ -311,6 +313,8 @@ static int xhci_plat_probe(struct platform_device *pdev) goto disable_clk; } hcd_to_bus(xhci->shared_hcd)->skip_resume = true; /* imod_interval is the interrupt moderation value in nanoseconds. */ xhci->imod_interval = 40000; Loading include/linux/usb.h +9 −0 Original line number Diff line number Diff line Loading @@ -470,6 +470,15 @@ struct usb_bus { struct mon_bus *mon_bus; /* non-null when associated */ int monitored; /* non-zero when monitored */ #endif unsigned skip_resume:1; /* All USB devices are brought into full * power state after system resume. It * is desirable for some buses to keep * their devices in suspend state even * after system resume. The devices * are resumed later when a remote * wakeup is detected or an interface * driver starts I/O. */ }; struct usb_dev_state; Loading Loading
drivers/usb/core/driver.c +12 −0 Original line number Diff line number Diff line Loading @@ -1463,6 +1463,9 @@ int usb_suspend(struct device *dev, pm_message_t msg) struct usb_device *udev = to_usb_device(dev); int r; if (udev->bus->skip_resume && udev->state == USB_STATE_SUSPENDED) return 0; unbind_no_pm_drivers_interfaces(udev); /* From now on we are sure all drivers support suspend/resume Loading Loading @@ -1499,6 +1502,15 @@ int usb_resume(struct device *dev, pm_message_t msg) struct usb_device *udev = to_usb_device(dev); int status; /* * Some buses would like to keep their devices in suspend * state after system resume. Their resume happen when * a remote wakeup is detected or interface driver start * I/O. */ if (udev->bus->skip_resume) return 0; /* For all calls, take the device back to full power and * tell the PM core in case it was autosuspended previously. * Unbind the interfaces that will need rebinding later, Loading
drivers/usb/host/xhci-plat.c +4 −0 Original line number Diff line number Diff line Loading @@ -246,6 +246,8 @@ static int xhci_plat_probe(struct platform_device *pdev) if (!hcd) return -ENOMEM; hcd_to_bus(hcd)->skip_resume = true; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); hcd->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(hcd->regs)) { Loading Loading @@ -311,6 +313,8 @@ static int xhci_plat_probe(struct platform_device *pdev) goto disable_clk; } hcd_to_bus(xhci->shared_hcd)->skip_resume = true; /* imod_interval is the interrupt moderation value in nanoseconds. */ xhci->imod_interval = 40000; Loading
include/linux/usb.h +9 −0 Original line number Diff line number Diff line Loading @@ -470,6 +470,15 @@ struct usb_bus { struct mon_bus *mon_bus; /* non-null when associated */ int monitored; /* non-zero when monitored */ #endif unsigned skip_resume:1; /* All USB devices are brought into full * power state after system resume. It * is desirable for some buses to keep * their devices in suspend state even * after system resume. The devices * are resumed later when a remote * wakeup is detected or an interface * driver starts I/O. */ }; struct usb_dev_state; Loading