diff options
author | Will Newton <will.newton@gmail.com> | 2008-08-12 10:39:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:41:07 -0400 |
commit | 59097fb73cf60276053551308524f6c772f305a9 (patch) | |
tree | ac240300da3c23d3536ad3cec3eee0f27a71b0bb | |
parent | 224b50390104af7602871894540d94cc759dc4c0 (diff) |
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 <will.newton@gmail.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/gadget/fsl_usb2_udc.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
643 | | EP_QUEUE_HEAD_STATUS_HALT)); | 643 | | EP_QUEUE_HEAD_STATUS_HALT)); |
644 | dQH->size_ioc_int_sts &= temp; | 644 | dQH->size_ioc_int_sts &= temp; |
645 | 645 | ||
646 | /* Ensure that updates to the QH will occure before priming. */ | ||
647 | wmb(); | ||
648 | |||
646 | /* Prime endpoint by writing 1 to ENDPTPRIME */ | 649 | /* Prime endpoint by writing 1 to ENDPTPRIME */ |
647 | temp = ep_is_in(ep) | 650 | temp = ep_is_in(ep) |
648 | ? (1 << (ep_index(ep) + 16)) | 651 | ? (1 << (ep_index(ep) + 16)) |