]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: usb3 ports do not support FEAT_C_ENABLE
authorDan Williams <dan.j.williams@intel.com>
Wed, 21 May 2014 01:09:10 +0000 (18:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 23:51:50 +0000 (16:51 -0700)
The port pm_runtime implementation unconditionally clears FEAT_C_ENABLE
after clearing PORT_POWER, but the bit is reserved on usb3 hub ports.
We expect khubd to be prevented from running because the port state is
not RPM_ACTIVE, so we need to clear any errors for usb2 ports.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/port.c

index f41f0512307e6fe410a8a3a4883692d2bfb6a07f..fb83c2c1392065d5c14de0a1cb531dc1447f08ce 100644 (file)
@@ -142,7 +142,8 @@ static int usb_port_runtime_suspend(struct device *dev)
        set_bit(port1, hub->busy_bits);
        retval = usb_hub_set_port_power(hdev, hub, port1, false);
        usb_clear_port_feature(hdev, port1, USB_PORT_FEAT_C_CONNECTION);
        set_bit(port1, hub->busy_bits);
        retval = usb_hub_set_port_power(hdev, hub, port1, false);
        usb_clear_port_feature(hdev, port1, USB_PORT_FEAT_C_CONNECTION);
-       usb_clear_port_feature(hdev, port1,     USB_PORT_FEAT_C_ENABLE);
+       if (!port_dev->is_superspeed)
+               usb_clear_port_feature(hdev, port1, USB_PORT_FEAT_C_ENABLE);
        clear_bit(port1, hub->busy_bits);
        usb_autopm_put_interface(intf);
 
        clear_bit(port1, hub->busy_bits);
        usb_autopm_put_interface(intf);