]> git.karo-electronics.de Git - karo-tx-linux.git/commit
MLK-10279-1 usb: common: otg-fsm: only signal connect after switching to peripheral
authorPeter Chen <peter.chen@freescale.com>
Sun, 15 Feb 2015 06:42:21 +0000 (14:42 +0800)
committerPeter Chen <peter.chen@freescale.com>
Fri, 27 Feb 2015 00:33:27 +0000 (08:33 +0800)
commit0fb0fc89739919e3386fa456fa30c8ab9c288b99
tree0ce4e033aaffe38a8b95082c36ef6c2e7754a868
parentda30d9ff558ca14a1d3dbe9a73c474d7c011a91d
MLK-10279-1 usb: common: otg-fsm: only signal connect after switching to peripheral

We should signal connect (pull up dp) after we have already
at peripheral mode, otherwise, the dp may be toggled due to
we reset controller or do disconnect during the initialization
for peripheral, then, the host may be confused during the
enumeration, eg, it finds the reset can't succeed, but the
device is still there, see below error message.

hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: cannot reset port 1 (err = -32)
hub 1-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
hub 1-0:1.0: unable to enumerate USB device on port 1

Signed-off-by: Peter Chen <peter.chen@freescale.com>
(cherry picked from commit b4b5728425454c1713d152855f09af9c9c12d78d)
drivers/usb/common/usb-otg-fsm.c