From: Michael Grzeschik Date: Sat, 30 Mar 2013 10:54:04 +0000 (+0200) Subject: usb: chipidea: udc: only clear active and halted bits in qhead X-Git-Tag: v5.15~20290^2~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=080ff5f4719e21c78f8ec96eea4f82b2fd047fa4;p=platform%2Fkernel%2Flinux-starfive.git usb: chipidea: udc: only clear active and halted bits in qhead The datasheet of the synopsys core describes only to overwrite the active and halted bits in the qhead before priming any endpoint. Signed-off-by: Michael Grzeschik Reviewed-by: Felipe Balbi [Alex: fixed a case of line-too-long] 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 ff393e1..0e11172a 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -461,7 +461,8 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq) /* QH configuration */ mEp->qh.ptr->td.next = cpu_to_le32(mReq->dma); /* TERMINATE = 0 */ - mEp->qh.ptr->td.token &= cpu_to_le32(~TD_STATUS); /* clear status */ + 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 */