From: Michael Grzeschik Date: Sat, 30 Mar 2013 10:54:06 +0000 (+0200) Subject: usb: chipidea: udc: move ZLT flag change to ep_enable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=776ffc16b74a5c19285135cfbc6dd02e1c733f25;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: chipidea: udc: move ZLT flag change to ep_enable Its not necessary and also not specified in the datasheet 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 Reviewed-by: Felipe Balbi Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 3abd1ad5ced1..94af0208dab8 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -463,7 +463,6 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq) mEp->qh.ptr->td.next = cpu_to_le32(mReq->dma); /* TERMINATE = 0 */ mEp->qh.ptr->td.token &= cpu_to_le32(~(TD_STATUS_HALTED|TD_STATUS_ACTIVE)); - mEp->qh.ptr->cap |= cpu_to_le32(QH_ZLT); wmb(); /* synchronize before ep prime */ @@ -1008,6 +1007,8 @@ static int ep_enable(struct usb_ep *ep, if (mEp->type == USB_ENDPOINT_XFER_CONTROL) cap |= QH_IOS; + if (mEp->num) + cap |= QH_ZLT; cap |= (mEp->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT; mEp->qh.ptr->cap = cpu_to_le32(cap);