Commit 92a3da41 authored by Matt Evans's avatar Matt Evans Committed by Sarah Sharp

xhci: Add rmb() between reading event validity & event data access.

On weakly-ordered systems, the reading of an event's content must occur
after reading the event's validity.
Signed-off-by: default avatarMatt Evans <matt@ozlabs.org>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
parent 28ccd296
......@@ -2193,6 +2193,11 @@ static void xhci_handle_event(struct xhci_hcd *xhci)
}
xhci_dbg(xhci, "%s - OS owns TRB\n", __func__);
/*
* Barrier between reading the TRB_CYCLE (valid) flag above and any
* speculative reads of the event's flags/data below.
*/
rmb();
/* FIXME: Handle more event types. */
switch ((le32_to_cpu(event->event_cmd.flags) & TRB_TYPE_BITMASK)) {
case TRB_TYPE(TRB_COMPLETION):
......
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