]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: chipidea: udc: only clear active and halted bits in qhead
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Sat, 30 Mar 2013 10:54:04 +0000 (12:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Mar 2013 15:20:48 +0000 (08:20 -0700)
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 <m.grzeschik@pengutronix.de>
Reviewed-by: Felipe Balbi <balbi@ti.com>
[Alex: fixed a case of line-too-long]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c

index ff393e1ecf4aedec5e79d6d2aedd2f5eb8d4abf3..0e11172a4c84aca892a1d60c7abdb2facd964593 100644 (file)
@@ -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 */