ChangeSet 1.1760.26.10, 2004/06/24 10:42:31-07:00, [EMAIL PROTECTED]

[PATCH] USB: Add mb() during initialization of UHCI controller

In a recent thread it was mentioned that some architectures, such as PPC,
do not guarantee relative ordering between different varieties of
processor/device data transfers.  This patch adds an mb() instruction to
the UHCI driver, to insure that the data structures in memory (cached by
the CPU and accessed by DMA) are fully flushed before the controller is
started (by regular bus IO).



Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/host/uhci-hcd.c |    5 +++++
 1 files changed, 5 insertions(+)


diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
--- a/drivers/usb/host/uhci-hcd.c       2004-06-29 16:26:06 -07:00
+++ b/drivers/usb/host/uhci-hcd.c       2004-06-29 16:26:06 -07:00
@@ -2261,6 +2261,11 @@
                uhci->fl->frame[i] = cpu_to_le32(uhci->skelqh[irq]->dma_handle);
        }
 
+       /*
+        * Some architectures require a full mb() to enforce completion of
+        * the memory writes above before the I/O transfers in start_hc().
+        */
+       mb();
        start_hc(uhci);
 
        init_stall_timer(hcd);



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to