summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jun <B47624@freescale.com>2014-09-27 22:23:39 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-23 16:56:10 +0300
commit2daa4d665bbfbf32dda8200ba27cc8bf653bd7a6 (patch)
tree59e6b0eacc71952a17545d74bd1c81ed77c62093
parent8ec33d94fcb3b459b3e1a19e79b00fbd3da410ed (diff)
MLK-9617-6 usb: core: otg: do not break otg device enumeration
If a HNP capable device STALL b_hnp_enable set feature request, A device as host should not break otg device enumeration, because this set feature failure only indicates the B device does not want to be host role for the moment, A device as host talk to it should be okay. see charpter 6.2.2.2 of OTG and EH 2.0: "If the a_hnp_support feature is set, but the b_hnp_enable feature is not set, then it is likely that b_hnp_enable will be set later when the A-device is finished using the bus." Signed-off-by: Li Jun <b47624@freescale.com> (cherry picked from commit 51317577d16034ba151da8d502319f4befb91278) (cherry picked from commit 3d5d5139b3aef654e8004a2ad9ce757af50aee57)
-rw-r--r--drivers/usb/core/hub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 09251d2daa40..6909b5db3254 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2207,9 +2207,9 @@ static inline void announce_device(struct usb_device *udev) { }
*/
static int usb_enumerate_device_otg(struct usb_device *udev)
{
+#ifdef CONFIG_USB_OTG
int err = 0;
-#ifdef CONFIG_USB_OTG
/*
* OTG-aware devices on OTG-capable root hubs may be able to use SRP,
* to wake us after we've powered off VBUS; and HNP, switching roles
@@ -2266,7 +2266,7 @@ static int usb_enumerate_device_otg(struct usb_device *udev)
}
}
#endif
- return err;
+ return 0;
}