diff options
| author | fktsai <fktsai@qca.qualcomm.com> | 2014-11-28 09:26:38 +0800 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2014-12-02 13:16:39 +0530 |
| commit | 3e90ac44ca8eed4280bd5d1448d5a1aa33702157 (patch) | |
| tree | 6e8e20f010a0522c4050b1200d5301923b9c8311 | |
| parent | 2a0b35492ad0c5746faa7a3703f58d73ea526b07 (diff) | |
qcacld: USB: shorter remove module time for USB3.0 device.
USB3.0 devcie will take a little longer time to remove module
due to target is under reset and miss the power state.
Change-Id: I02459404fa7492484f71412793b14a8a6ce10054
CRs-Fixed: 764395
| -rw-r--r-- | CORE/SERVICES/HIF/USB/if_usb.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/CORE/SERVICES/HIF/USB/if_usb.c b/CORE/SERVICES/HIF/USB/if_usb.c index c8f894c80748..cf0c41368ca8 100644 --- a/CORE/SERVICES/HIF/USB/if_usb.c +++ b/CORE/SERVICES/HIF/USB/if_usb.c @@ -223,6 +223,7 @@ err_alloc: static void hif_usb_remove(struct usb_interface *interface) { HIF_DEVICE_USB *device = usb_get_intfdata(interface); + struct usb_device *udev = interface_to_usbdev(interface); struct hif_usb_softc *sc = device->sc; struct ol_softc *scn; @@ -239,12 +240,20 @@ static void hif_usb_remove(struct usb_interface *interface) set_current_state(TASK_RUNNING); usb_sc->hdd_removed_wait_cnt ++; } - /* do cold reset */ - HIFDiagWriteCOLDRESET(sc->hif_device); - /* wait for target jump to boot code and finish the initialization */ + + /* disable lpm to avoid following cold reset will + *cause xHCI U1/U2 timeout + */ + usb_disable_lpm(udev); + + /* wait for disable lpm */ set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(msecs_to_jiffies(DELAY_FOR_TARGET_READY)); set_current_state(TASK_RUNNING); + + /* do cold reset */ + HIFDiagWriteCOLDRESET(sc->hif_device); + if (usb_sc->suspend_state) { hif_usb_resume(usb_sc->interface); } |
