From: Will Newton Date: Tue, 12 Aug 2008 14:39:16 +0000 (+0100) Subject: fsl_usb2_udc: Add a wmb before priming endpoint. X-Git-Tag: v2.6.28-rc1~254^2~19 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=59097fb73cf60276053551308524f6c772f305a9;p=karo-tx-linux.git fsl_usb2_udc: Add a wmb before priming endpoint. Add a wmb to fsl_queue_td before priming the endpoint. This ensures that the modifications to the QH are seen by the hardware. Added comment as suggested by Felipe Balbi. Signed-off-by: Will Newton Acked-by: Li Yang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index 6f6272031344..0492441bc0ba 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c @@ -643,6 +643,9 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req) | EP_QUEUE_HEAD_STATUS_HALT)); dQH->size_ioc_int_sts &= temp; + /* Ensure that updates to the QH will occure before priming. */ + wmb(); + /* Prime endpoint by writing 1 to ENDPTPRIME */ temp = ep_is_in(ep) ? (1 << (ep_index(ep) + 16))