From 447e007208024fc6ea7ef37aba3a3e3a6489655f Mon Sep 17 00:00:00 2001 From: Michael Grzeschik Date: Sat, 30 Mar 2013 12:54:05 +0200 Subject: [PATCH] --- yaml --- r: 364507 b: refs/heads/master c: 1cd12a9cf055e72b3094ef38ac4d9afff2e9520e h: refs/heads/master i: 364505: bc9bf792ff91cddd39835f3b16246748b5dbd1a7 364503: f371f97feb78fd9539e2a58e555a09fb3d9b6f28 v: v3 --- [refs] | 2 +- trunk/drivers/usb/chipidea/udc.c | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index f46a2a957c25..38fa3af9d56c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 080ff5f4719e21c78f8ec96eea4f82b2fd047fa4 +refs/heads/master: 1cd12a9cf055e72b3094ef38ac4d9afff2e9520e diff --git a/trunk/drivers/usb/chipidea/udc.c b/trunk/drivers/usb/chipidea/udc.c index 0e11172a4c84..3abd1ad5ced1 100644 --- a/trunk/drivers/usb/chipidea/udc.c +++ b/trunk/drivers/usb/chipidea/udc.c @@ -986,6 +986,7 @@ static int ep_enable(struct usb_ep *ep, struct ci13xxx_ep *mEp = container_of(ep, struct ci13xxx_ep, ep); int retval = 0; unsigned long flags; + u32 cap = 0; if (ep == NULL || desc == NULL) return -EINVAL; @@ -1005,17 +1006,12 @@ static int ep_enable(struct usb_ep *ep, mEp->ep.maxpacket = usb_endpoint_maxp(desc); - mEp->qh.ptr->cap = 0; - if (mEp->type == USB_ENDPOINT_XFER_CONTROL) - mEp->qh.ptr->cap |= cpu_to_le32(QH_IOS); - else if (mEp->type == USB_ENDPOINT_XFER_ISOC) - mEp->qh.ptr->cap &= cpu_to_le32(~QH_MULT); - else - mEp->qh.ptr->cap &= cpu_to_le32(~QH_ZLT); + cap |= QH_IOS; + cap |= (mEp->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT; + + mEp->qh.ptr->cap = cpu_to_le32(cap); - mEp->qh.ptr->cap |= cpu_to_le32((mEp->ep.maxpacket << __ffs(QH_MAX_PKT)) - & QH_MAX_PKT); mEp->qh.ptr->td.next |= cpu_to_le32(TD_TERMINATE); /* needed? */ /*