From: Anand Gadiyar <[EMAIL PROTECTED]>

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 <[EMAIL PROTECTED]>
---
Fixed my mailer finally. :)

 drivers/usb/musb/musb_gadget_ep0.c |    2 ++
 1 files changed, 2 insertions(+)

Index: linux-omap-2.6/drivers/usb/musb/musb_gadget_ep0.c
===================================================================
--- linux-omap-2.6.orig/drivers/usb/musb/musb_gadget_ep0.c      2008-04-14 
15:36:38.000000000 +0530
+++ linux-omap-2.6/drivers/usb/musb/musb_gadget_ep0.c   2008-08-21 
18:12:11.688711634 +0530
@@ -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);
 }
 --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to