This patch effectively reverts upstream commit
9214d1d8, which enabled
USB persist by default. We have long had disabled persist on ChromeOS
through an explicit sysfs write from powerd_suspend to save kernel
resume time. This change will make that solution obsolete by disabling
persist by default from the kernel, resulting in a much cleaner system
state that does not flip-flop between persist/non-persist during
suspend/resume. This will also solve issues with autosuspend on drivers
that do not provide a reset_resume method.
BUG=chrome-os-partner:17609
TEST=Boot kernel, make sure that /sys/bus/usb/devices/*/power/persist
are all zeroes (and stay that way over suspend and when plugging in more
devices).
Change-Id: If3ef6423a82aa9af0cb1b10c49da0ffa8201224a
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/45326
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
dev_dbg(&udev->dev, "USB quirks for this device: %x\n",
udev->quirks);
- /* For the present, all devices default to USB-PERSIST enabled */
-#if 0 /* was: #ifdef CONFIG_PM */
+ /* ChromeOS does not use persist to decrease kernel resume time */
+#if 1 /* was: 0 */ /* was: #ifdef CONFIG_PM */
/* Hubs are automatically enabled for USB-PERSIST */
if (udev->descriptor.bDeviceClass == USB_CLASS_HUB)
udev->persist_enabled = 1;