]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: otg: mxs-phy: Fix mx23 operation
authorMike Thompson <mpthompson@gmail.com>
Thu, 30 Aug 2012 21:26:25 +0000 (18:26 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Oct 2012 15:39:29 +0000 (08:39 -0700)
commit2f710e1def8d4639f124f06aa08bc06c142efb84
treec000bf89e465e9e3273f973df37c9497634c7173
parentcd46958d3b8b5e3c22596c2ec3da3d8dd0501777
usb: otg: mxs-phy: Fix mx23 operation

commit 363366cf61c544ea476f3d220f43a95cb03014f5 upstream.

Currently mx23 fails to enumerate a USB device:

[ 1.300000] hub 1-0:1.0: unable to enumerate USB device on port 1
[ 1.520000] hub 1-0:1.0: unable to enumerate USB device on port 1
[ 1.740000] hub 1-0:1.0: unable to enumerate USB device on port 1
[ 1.960000] hub 1-0:1.0: unable to enumerate USB device on port 1
[ 2.180000] hub 1-0:1.0: unable to enumerate USB device on port 1

Use a kernel workqueue to asynchronously delay the setting of
ENHOSTDISCONDETECT bit until after higher level hub connect/reset processing
is complete.  Prematurely setting the bit prevents the connection
processing from completing and not setting it prevents disconnect from being
detected. No delay is needed for clearing of ENHOSTDISCONDETECT.

Successfully tested on mx23-olinuxino (micro, mini and maxi variants) and mx28evk.

Signed-off-by: Mike Thompson <mpthompson@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/otg/mxs-phy.c