From: Lan Tianyu <[email protected]>
The pm qos NO_POWER_OFF flag is checked twice during usb device suspend
to see if the usb port power off condition is met. This is redundant and
also will prevent the port from being powered off if the NO_POWER_OFF
flag is changed to 1 from 0 after the device was already suspended.
More detail in the following link.
http://marc.info/?l=linux-usb&m=136543949130865&w=2
This patch should be backported to kernels as old as 3.7, that
contain the commit f7ac7787ad361e31a7972e2854ed8dc2eedfac3b "usb/acpi:
Use ACPI methods to power off ports."
Signed-off-by: Lan Tianyu <[email protected]>
Signed-off-by: Sarah Sharp <[email protected]>
Cc: [email protected]
---
drivers/usb/core/hub.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 558313d..8a9379c 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2918,7 +2918,6 @@ int usb_port_suspend(struct usb_device *udev,
pm_message_t msg)
{
struct usb_hub *hub = usb_hub_to_struct_hub(udev->parent);
struct usb_port *port_dev = hub->ports[udev->portnum - 1];
- enum pm_qos_flags_status pm_qos_stat;
int port1 = udev->portnum;
int status;
bool really_suspend = true;
@@ -3043,10 +3042,7 @@ int usb_port_suspend(struct usb_device *udev,
pm_message_t msg)
* Check whether current status meets the requirement of
* usb port power off mechanism
*/
- pm_qos_stat = dev_pm_qos_flags(&port_dev->dev,
- PM_QOS_FLAG_NO_POWER_OFF);
if (!udev->do_remote_wakeup
- && pm_qos_stat != PM_QOS_FLAGS_ALL
&& udev->persist_enabled
&& !status) {
pm_runtime_put_sync(&port_dev->dev);
--
1.8.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html