Commit 9475c0b7 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[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: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent a29c78b8
......@@ -2261,6 +2261,11 @@ static int uhci_start(struct usb_hcd *hcd)
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);
......
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