diff options
author | Matt Evans <matt@ozlabs.org> | 2011-03-28 22:40:51 -0400 |
---|---|---|
committer | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2011-05-02 19:42:49 -0400 |
commit | 92a3da410aac6e14daaefe13c60368ca28e85830 (patch) | |
tree | e3f3fe45d360315ea118f8c4dc47c65a068078a1 /drivers/usb/host/xhci-ring.c | |
parent | 28ccd2962c66556d7037b2d9f1c11cdcd3b805d5 (diff) |
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: Matt Evans <matt@ozlabs.org>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 9b1eeb04ce69..e0f05f5abe10 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -2193,6 +2193,11 @@ static void xhci_handle_event(struct xhci_hcd *xhci) | |||
2193 | } | 2193 | } |
2194 | xhci_dbg(xhci, "%s - OS owns TRB\n", __func__); | 2194 | xhci_dbg(xhci, "%s - OS owns TRB\n", __func__); |
2195 | 2195 | ||
2196 | /* | ||
2197 | * Barrier between reading the TRB_CYCLE (valid) flag above and any | ||
2198 | * speculative reads of the event's flags/data below. | ||
2199 | */ | ||
2200 | rmb(); | ||
2196 | /* FIXME: Handle more event types. */ | 2201 | /* FIXME: Handle more event types. */ |
2197 | switch ((le32_to_cpu(event->event_cmd.flags) & TRB_TYPE_BITMASK)) { | 2202 | switch ((le32_to_cpu(event->event_cmd.flags) & TRB_TYPE_BITMASK)) { |
2198 | case TRB_TYPE(TRB_COMPLETION): | 2203 | case TRB_TYPE(TRB_COMPLETION): |