MLK-11269-2 usb: chipidea: host: avoid check PORT_SUSPEND wrongly
authorPeter Chen <peter.chen@freescale.com>
Tue, 21 Jul 2015 06:41:59 +0000 (14:41 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:47:18 +0000 (14:47 -0500)
commit7ebf64d46721b814c668730ce230874236471661
tree76b0e267bf00d81f1fefee9d1d1a48dac2e21c7e
parent260db1165435b52e2d32cfc9a9d035d493eaeddf
MLK-11269-2 usb: chipidea: host: avoid check PORT_SUSPEND wrongly

At some situations, the ehci_bus_suspend may not set PORT_SUSPEND
due to port is not enabled, so add flag ehci->bus_suspended to
check if ehci_bus_suspend set PORT_SUSPEND or not.

We see "ci_hdrc ci_hdrc.0: timeout waiting for SUSPEND" wrongly when
plug in an unsupported usb device, in that case, the PORT_PE is cleared
and bus_suspend is called.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit 82cfe6c31ee55e5aab1a057a5aaf853b7bb6cd07)
(cherry picked from commit a4fe7e55e84944962d6a7be7bd404865d376811e)
drivers/usb/chipidea/host.c