USB Port Power-Off during suspend Bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan, Rafael, Greg,

long story short: I want to disable a usb-port completely during suspend
because it isn't needed and we need to save energy, because is a 32bit ARM
(OF-based) handheld device. I use the port to connect a usb-ethernet
dongle (all needed drivers are builtin no modules) which is needed for
the NFS. The usb-ethernet dongle supports the persist setting because it
does a hw-reset during resume anyway.

So what I did is:
 1) Set the persist bit for the usb device
 2) Set the control to auto for the usb device
 3) Unset the pm_qos_no_power_off flag for the usb-port

But the port gets not disabled. I debugged it and found a problem in
usb_port_suspend() logic [1] and the generic PM-framework more precisely
the dpm mechanism. The usbcore does the correct pm_runtime counting but
the call [2] don't trigger the usb_port_runtime_suspend() [3] because
the dpm enables all runtime-pm device before the shutdown is executed.
IMHO both subsystem behaviours are correct and I don't know the
_correct_ fix, therefore I wrote this email.

As far as I understood it all non-ACPI platforms are affected.

Regards,
  Marco

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/core/hub.c?h=v5.5#n3238
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/core/hub.c?h=v5.5#n3328
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/core/port.c?h=v5.5#n247



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux