]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: gadget: mv_udc: fix bug when handle setup package.
authorNeil Zhang <zhangwm@marvell.com>
Wed, 12 Oct 2011 08:49:30 +0000 (16:49 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 13 Oct 2011 17:42:02 +0000 (20:42 +0300)
For the code doesn't restrict controller ep must be ep0, so we will go
through all the eps and check if there is a setup package received.
And also we just need to acknowledge the corresponding bit in
ENDPTSETUPSTAT register.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/mv_udc_core.c

index 8dab8c4d10bddf7d81b73e440f09dc80142e799e..fcb980def6241030e46fcdb779ca2c2e8a9c6e8c 100644 (file)
@@ -1631,8 +1631,7 @@ static void get_setup_data(struct mv_udc *udc, u8 ep_num, u8 *buffer_ptr)
        dqh = &udc->ep_dqh[ep_num * 2 + EP_DIR_OUT];
 
        /* Clear bit in ENDPTSETUPSTAT */
-       temp = readl(&udc->op_regs->epsetupstat);
-       writel(temp | (1 << ep_num), &udc->op_regs->epsetupstat);
+       writel((1 << ep_num), &udc->op_regs->epsetupstat);
 
        /* while a hazard exists when setup package arrives */
        do {