Revert "usb: core: lpm: set lpm_capable for root hub device" 50/113450/1 accepted/tizen/common/20170213.174421 accepted/tizen/ivi/20170214.011029 accepted/tizen/mobile/20170214.010859 accepted/tizen/tv/20170214.010936 accepted/tizen/wearable/20170214.010957 submit/tizen/20170213.015421
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 7 Feb 2017 13:54:33 +0000 (14:54 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 7 Feb 2017 13:55:06 +0000 (14:55 +0100)
After a rebase onto 4.1.36 xHCI ports on OdroidXU4 stopped working. This
has been caused by commit e951f84074b84a3f5aecbffd01da74576e0068d5 applied
in mainline. This patch reverts it to get xHCI ports working again.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I86feaf60472efaf6c045b4f1ecb28f9ab936a01f

drivers/usb/core/hcd.c
drivers/usb/core/hub.c
drivers/usb/core/usb.h

index 3a49ba2910dfe87ef72ff3d5ef0b64885842f9ab..04a96309bffb91e53b764ed71127d84fd460b3f7 100644 (file)
@@ -1022,12 +1022,9 @@ static int register_root_hub(struct usb_hcd *hcd)
                                dev_name(&usb_dev->dev), retval);
                return (retval < 0) ? retval : -EMSGSIZE;
        }
-
-       if (le16_to_cpu(usb_dev->descriptor.bcdUSB) >= 0x0201) {
+       if (usb_dev->speed == USB_SPEED_SUPER) {
                retval = usb_get_bos_descriptor(usb_dev);
-               if (!retval) {
-                       usb_dev->lpm_capable = usb_device_supports_lpm(usb_dev);
-               } else if (usb_dev->speed == USB_SPEED_SUPER) {
+               if (retval < 0) {
                        mutex_unlock(&usb_bus_list_lock);
                        dev_dbg(parent_dev, "can't read %s bos descriptor %d\n",
                                        dev_name(&usb_dev->dev), retval);
index c98f78b0bf1126731b69fc62ff7807609f40dea4..ab49999fb2f642e6d89cfd8a9a379d5c5c11b669 100644 (file)
@@ -122,7 +122,7 @@ struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev)
        return usb_get_intfdata(hdev->actconfig->interface[0]);
 }
 
-int usb_device_supports_lpm(struct usb_device *udev)
+static int usb_device_supports_lpm(struct usb_device *udev)
 {
        /* Some devices have trouble with LPM */
        if (udev->quirks & USB_QUIRK_NO_LPM)
index 457255a3306a3c2837674d22aa9560bf30842220..7eb1e26798e5f293a3f2bc508dd268bbecdb63f1 100644 (file)
@@ -65,7 +65,6 @@ extern int  usb_hub_init(void);
 extern void usb_hub_cleanup(void);
 extern int usb_major_init(void);
 extern void usb_major_cleanup(void);
-extern int usb_device_supports_lpm(struct usb_device *udev);
 
 #ifdef CONFIG_PM