Skip to content

Commit

Permalink
usb: gadget: mv_udc: init next dtd ptr for dqh when init ep0
Browse files Browse the repository at this point in the history
Set next dtd ptr to EP_QUEUE_HEAD_NEXT_TERMINATE for dqh when init ep0.
It means the dQH is empty.

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 43ad9f3 commit fbebe1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/gadget/mv_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ static void ep0_reset(struct mv_udc *udc)
(EP0_MAX_PKT_SIZE << EP_QUEUE_HEAD_MAX_PKT_LEN_POS)
| EP_QUEUE_HEAD_IOS;

ep->dqh->next_dtd_ptr = EP_QUEUE_HEAD_NEXT_TERMINATE;

epctrlx = readl(&udc->op_regs->epctrlx[0]);
if (i) { /* TX */
epctrlx |= EPCTRL_TX_ENABLE
Expand Down

0 comments on commit fbebe1f

Please sign in to comment.