diff options
author | Neil Zhang <zhangwm@marvell.com> | 2011-10-12 04:49:30 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 13:42:02 -0400 |
commit | 96c2bbb09d0742148a305d7afbdf7c5803fd78c1 (patch) | |
tree | 85f75eeedcaedf0200631d3c5176ce2862ae5bef /drivers/usb | |
parent | fbebe1f070a73c108415bb9ee0483570650e2712 (diff) |
usb: gadget: mv_udc: fix bug when handle setup package.
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/mv_udc_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 8dab8c4d10bd..fcb980def624 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c | |||
@@ -1631,8 +1631,7 @@ static void get_setup_data(struct mv_udc *udc, u8 ep_num, u8 *buffer_ptr) | |||
1631 | dqh = &udc->ep_dqh[ep_num * 2 + EP_DIR_OUT]; | 1631 | dqh = &udc->ep_dqh[ep_num * 2 + EP_DIR_OUT]; |
1632 | 1632 | ||
1633 | /* Clear bit in ENDPTSETUPSTAT */ | 1633 | /* Clear bit in ENDPTSETUPSTAT */ |
1634 | temp = readl(&udc->op_regs->epsetupstat); | 1634 | writel((1 << ep_num), &udc->op_regs->epsetupstat); |
1635 | writel(temp | (1 << ep_num), &udc->op_regs->epsetupstat); | ||
1636 | 1635 | ||
1637 | /* while a hazard exists when setup package arrives */ | 1636 | /* while a hazard exists when setup package arrives */ |
1638 | do { | 1637 | do { |