Commit 59097fb7 authored by Will Newton's avatar Will Newton Committed by Greg Kroah-Hartman

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: default avatarWill Newton <will.newton@gmail.com>
Acked-by: default avatarLi Yang <leoli@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 224b5039
...@@ -643,6 +643,9 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req) ...@@ -643,6 +643,9 @@ static void fsl_queue_td(struct fsl_ep *ep, struct fsl_req *req)
| EP_QUEUE_HEAD_STATUS_HALT)); | EP_QUEUE_HEAD_STATUS_HALT));
dQH->size_ioc_int_sts &= temp; dQH->size_ioc_int_sts &= temp;
/* Ensure that updates to the QH will occure before priming. */
wmb();
/* Prime endpoint by writing 1 to ENDPTPRIME */ /* Prime endpoint by writing 1 to ENDPTPRIME */
temp = ep_is_in(ep) temp = ep_is_in(ep)
? (1 << (ep_index(ep) + 16)) ? (1 << (ep_index(ep) + 16))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment