ChangeSet 1.1760.26.10, 2004/06/24 10:42:31-07:00, stern@rowland.harvard.edu [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 Signed-off-by: Greg Kroah-Hartman 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);