After enabling SuperSpeed mode on Exynos54xx by resolving CRPORT reset
issue, lpm_capable for root hub device is also set again. However,
some devices still failed to enumerate due to LPM issues. Thus, this
patch re-reverts commit
7b799aa2bf57 ("Revert "Revert "usb: core: lpm:
set lpm_capable for root hub device""").
<This is workaround, lpm_capable will be restored after resolving issue>
Change-Id: Ia1013c2e6233ee3994941555fd21b418983d1430
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
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);
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)
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