Revert "usb: hub: Prevent hub autosuspend if usbcore.autosuspend is -1"
Certain USB-C devices are failing to enumerate if the bus transitions from active to suspend between connection and enumeration. When a USB-C accessory is inserted in a phone and is detected by the CC lines, the controller driver is loaded and the only devices present on the bus are the root hubs, until the device enumerations. As a result, a suspend transition between device connection and enumeration is very likely. This change leaves the hub autosuspend set to the usbcore.autosuspend value so a value can be set high enough to prevent this race. This reverts: commitbdd405d2a5
("usb: hub: Prevent hub autosuspend if usbcore.autosuspend is -1") If user specifies that USB autosuspend must be disabled by module parameter "usbcore.autosuspend=-1" then we must prevent autosuspend of USB hub devices as well. commit596d789a21
introduced in v3.8 changed the original behaivour and stopped respecting the usbcore.autosuspend parameter for hubs. Bug: 71936484 Change-Id: Ie20471b9e8d44f92f9eff97ed12ccd903c98c272 Signed-off-by: Thierry Strudel <tstrudel@google.com> Signed-off-by: Andrew Chant <achant@google.com>
This commit is contained in:
parent
daa6b3cc4a
commit
782f48975e
1 changed files with 1 additions and 7 deletions
|
@ -1724,14 +1724,8 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|||
* - Change autosuspend delay of hub can avoid unnecessary auto
|
||||
* suspend timer for hub, also may decrease power consumption
|
||||
* of USB bus.
|
||||
*
|
||||
* - If user has indicated to prevent autosuspend by passing
|
||||
* usbcore.autosuspend = -1 then keep autosuspend disabled.
|
||||
*/
|
||||
#ifdef CONFIG_PM
|
||||
if (hdev->dev.power.autosuspend_delay >= 0)
|
||||
pm_runtime_set_autosuspend_delay(&hdev->dev, 0);
|
||||
#endif
|
||||
pm_runtime_set_autosuspend_delay(&hdev->dev, 0);
|
||||
|
||||
/*
|
||||
* Hubs have proper suspend/resume support, except for root hubs
|
||||
|
|
Loading…
Add table
Reference in a new issue