lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5b0800806030820i16b36366qf199e1c56d729fbe@mail.gmail.com>
Date:	Tue, 3 Jun 2008 16:20:25 +0100
From:	"Will Newton" <will.newton@...il.com>
To:	linux-usb@...r.kernel.org,
	"Linux Kernel list" <linux-kernel@...r.kernel.org>,
	leoli@...escale.com
Subject: [PATCH] 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.

Signed-off-by: Will Newton <will.newton@...il.com>
---
 drivers/usb/gadget/fsl_usb2_udc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/fsl_usb2_udc.c
b/drivers/usb/gadget/fsl_usb2_udc.c
index 1868754..dd06a5b 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -653,6 +653,8 @@ static int fsl_queue_td(struct fsl_ep *ep, struct
fsl_req *req)
 			| EP_QUEUE_HEAD_STATUS_HALT));
 	dQH->size_ioc_int_sts &= temp;

+	wmb();
+
 	/* Prime endpoint by writing 1 to ENDPTPRIME */
 	temp = ep_is_in(ep)
 		? (1 << (ep_index(ep) + 16))
-- 
1.5.5.2

View attachment "0001-fsl_usb2_udc-Add-a-wmb-before-priming-endpoint.patch" of type "text/x-patch" (971 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ