[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1216135490-21656-11-git-send-email-will.newton@imgtec.com>
Date: Tue, 15 Jul 2008 16:24:49 +0100
From: Will Newton <will.newton@...tec.com>
To: linux-kernel@...r.kernel.org
Cc: linux-usb@...r.kernel.org, leoli@...escale.com,
tanya.jiang@...escale.com, gregkh@...e.de,
Will Newton <will.newton@...il.com>
Subject: [PATCH 10/11] fsl_usb2_udc: Add a wmb before priming endpoint.
From: Will Newton <will.newton@...il.com>
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@...il.com>
---
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 81cba99..15b7cea 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))
--
1.5.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists