Its not needed to change the ZLT flag before every ep_prime. This patch moves this to the ep_enable and applies it only for non configuration endpoints. Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx> --- Changes since v1: - rebased on the new alignment patch drivers/usb/chipidea/udc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 73ddcc9..53c6c7f 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -474,7 +474,6 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq) /* QH configuration */ mEp->qh.ptr->td.next = mReq->dma; /* TERMINATE = 0 */ mEp->qh.ptr->td.token &= ~(TD_STATUS_HALTED|TD_STATUS_ACTIVE); /* clear status */ - mEp->qh.ptr->cap |= QH_ZLT; wmb(); /* synchronize before ep prime */ @@ -1038,6 +1037,8 @@ static int ep_enable(struct usb_ep *ep, mEp->qh.ptr->cap &= ~QH_MULT; else mEp->qh.ptr->cap &= ~QH_ZLT; + if (mEp->num) + mEp->qh.ptr->cap |= QH_ZLT; mEp->qh.ptr->cap |= (mEp->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT; -- 1.8.2.rc2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html