This is a note to let you know that I've just added the patch titled Subject: MUSB: Fix index register corruption seen with g_ether and Windows host to my gregkh-2.6 tree. Its filename is musb-fix-index-register-corruption-seen-with-g_ether-and-windows-host.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ >From gadiyar@xxxxxx Thu Aug 21 08:40:33 2008 From: "Gadiyar, Anand" <gadiyar@xxxxxx> Date: Thu, 21 Aug 2008 20:21:00 +0530 Subject: MUSB: Fix index register corruption seen with g_ether and Windows host To: "greg@xxxxxxxxx" <greg@xxxxxxxxx>, "linux-usb@xxxxxxxxxxxxxxx" <linux-usb@xxxxxxxxxxxxxxx> Cc: "linux-omap@xxxxxxxxxxxxxxx" <linux-omap@xxxxxxxxxxxxxxx>, "felipe.balbi@xxxxxxxxx" <felipe.balbi@xxxxxxxxx>, Tony Lindgren <tony@xxxxxxxxxxx> Message-ID: <5A47E75E594F054BAF48C5E4FC4B92AB02C3E31565@xxxxxxxxxxxxxxxxx> From: Anand Gadiyar <gadiyar@xxxxxx> 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@xxxxxx> Acked-by: Felipe Balbi <felipe.balbi@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/usb/musb/musb_gadget_ep0.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/musb/musb_gadget_ep0.c +++ b/drivers/usb/musb/musb_gadget_ep0.c @@ -476,6 +476,7 @@ static void ep0_rxstate(struct musb *mus return; musb->ackpend = 0; } + musb_ep_select(musb->mregs, 0); musb_writew(regs, MUSB_CSR0, tmp); } @@ -528,6 +529,7 @@ static void ep0_txstate(struct musb *mus } /* send it out, triggering a "txpktrdy cleared" irq */ + musb_ep_select(musb->mregs, 0); musb_writew(regs, MUSB_CSR0, csr); } Patches currently in gregkh-2.6 which might be from gadiyar@xxxxxx are usb.current/usb-musb-get-rid-of-musb_loglevel-and-use-parameter.patch usb.current/usb-musb-get-rid-of-procfs-entry.patch usb.current/musb-fix-index-register-corruption-seen-with-g_ether-and-windows-host.patch -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html