Skip to content

Commit

Permalink
usb: gadget: mv_udc: fix bug when handle setup package.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Neil Zhang authored and Felipe Balbi committed Oct 13, 2011
1 parent fbebe1f commit 96c2bbb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/gadget/mv_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 96c2bbb

Please sign in to comment.