From: Neil Zhang Date: Wed, 12 Oct 2011 08:49:29 +0000 (+0800) Subject: usb: gadget: mv_udc: init next dtd ptr for dqh when init ep0 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fbebe1f070a73c108415bb9ee0483570650e2712;p=linux-beck.git usb: gadget: mv_udc: init next dtd ptr for dqh when init ep0 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 80168d11841d..8dab8c4d10bd 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -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