Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] USB: fix OHCI PM regression

This fixes a small regression in USB controller power usage for many
OHCI controllers, notably including every non-PCI version of OHCI: on
those systems, the runtime autosuspend mechanism is no longer enabled.

The change moves to saner defaults. All root hubs are expected to handle
remote wakeup (and hence autosuspend), although drivers for buggy silicon
may override that default.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

David Brownell and committed by
Greg Kroah-Hartman
db4cefaa 7e713b82

+6 -7
+6 -7
drivers/usb/core/hcd.c
··· 1805 1805 USB_SPEED_FULL; 1806 1806 hcd->self.root_hub = rhdev; 1807 1807 1808 + /* wakeup flag init defaults to "everything works" for root hubs, 1809 + * but drivers can override it in reset() if needed, along with 1810 + * recording the overall controller's system wakeup capability. 1811 + */ 1812 + device_init_wakeup(&rhdev->dev, 1); 1813 + 1808 1814 /* "reset" is misnamed; its role is now one-time init. the controller 1809 1815 * should already have been reset (and boot firmware kicked off etc). 1810 1816 */ ··· 1818 1812 dev_err(hcd->self.controller, "can't setup\n"); 1819 1813 goto err_hcd_driver_setup; 1820 1814 } 1821 - 1822 - /* wakeup flag init is in transition; for now we can't rely on PCI to 1823 - * initialize these bits properly, so we let reset() override it. 1824 - * This init should _precede_ the reset() once PCI behaves. 1825 - */ 1826 - device_init_wakeup(&rhdev->dev, 1827 - device_can_wakeup(hcd->self.controller)); 1828 1815 1829 1816 /* NOTE: root hub and controller capabilities may not be the same */ 1830 1817 if (device_can_wakeup(hcd->self.controller)