The port pm_runtime implementation unconditionally clears FEAT_C_ENABLE
after clearing PORT_POWER, but the bit is reserved on usb3 hub ports.

It also takes steps to re-disable the port if it fails to reconnect
which again is broken on usb3 ports and unnecessary on usb2 ports.

Signed-off-by: Dan Williams <dan.j.willi...@intel.com>
---
 drivers/usb/core/port.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
index 217a3c6df29e..97e4939fee1a 100644
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -102,7 +102,6 @@ static int usb_port_runtime_resume(struct device *dev)
                if (retval < 0)
                        dev_dbg(&port_dev->dev, "can't get reconnection after 
setting port  power on, status %d\n",
                                        retval);
-               usb_clear_port_feature(hdev, port1, USB_PORT_FEAT_C_ENABLE);
                retval = 0;
        }
 
@@ -142,7 +141,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);
-       usb_clear_port_feature(hdev, port1,     USB_PORT_FEAT_C_ENABLE);
+       if (!hub_is_superspeed(hdev))
+               usb_clear_port_feature(hdev, port1, USB_PORT_FEAT_C_ENABLE);
        clear_bit(port1, hub->busy_bits);
        usb_autopm_put_interface(intf);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to