diff options
author | Li Jun <b47624@freescale.com> | 2014-11-12 10:26:49 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 09:23:22 -0500 |
commit | ff592f5dc8118f5c64a731e60f337a9358b03ed1 (patch) | |
tree | ff1201870ff5c3f6438a690742d07c1bcc4d1559 /drivers/usb | |
parent | adcdabc3b8268e49bedef565a3fbd930ee51dc8b (diff) |
MLK-9827 usb: core: clear OTG HNP flags when enumeration of new device
We set b_hnp_enable and a_set_b_hnp_en when enumeration of HNP capable
otg device, those 2 flags should be cleared beforehand for any new usb
devices connected.
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <jun.li@freescale.com>
(cherry picked from commit e332229d38c15a83bb3ee0bfc3638a539a836b8a)
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/hub.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 97e2652bb487..6f20dae1791b 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -2192,6 +2192,12 @@ static int usb_enumerate_device_otg(struct usb_device *udev) struct usb_otg_descriptor *desc = NULL; struct usb_bus *bus = udev->bus; + /* Clear otg fsm hnp flags firstly */ + if (bus->otg_fsm) { + bus->otg_fsm->b_hnp_enable = 0; + bus->otg_fsm->a_set_b_hnp_en = 0; + } + /* descriptor may appear anywhere in config */ if (__usb_get_extra_descriptor (udev->rawdescriptors[0], le16_to_cpu(udev->config[0].desc.wTotalLength), |