]> git.baikalelectronics.ru Git - kernel.git/commit
MUSB: Fix index register corruption seen with g_ether and Windows host
authorAnand Gadiyar <gadiyar@ti.com>
Thu, 21 Aug 2008 14:51:00 +0000 (20:21 +0530)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Aug 2008 17:26:34 +0000 (10:26 -0700)
commit4234d3eb56d1121acfe8cbd017c2512273499dca
tree3af15b058a217f2411329711511870b736485386
parentaf3f8e0ef7c2ccd41ce2e24b37c79a8214cb673f
MUSB: Fix index register corruption seen with g_ether and Windows host

If Indexed Mode register accesses are enabled, the ep0_rxstate()
function calls musb_g_ep0_giveback() before writing to the CSR
register. When control returns to this ep0_rxstate, the index
register contents are over-written. This causes the CSR register
write to fail.

Fixed by writing the correct value into the index register before
writing to the CSR.

This was observed only in ep0_rxstate() with g_ether loaded and
the device connected to a MS Windows host PC. Anticipatively fixed
ep0_txstate() as well.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/musb/musb_gadget_ep0.c