[SeaBIOS] [PATCH 18/19] usb: Fix barrier() placement in OHCI interrupt schedule add.
Kevin O'Connor
kevin at koconnor.net
Sun Mar 11 03:49:10 CET 2012
Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
src/usb-ohci.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/usb-ohci.c b/src/usb-ohci.c
index 9980a8e..b0d0365 100644
--- a/src/usb-ohci.c
+++ b/src/usb-ohci.c
@@ -353,16 +353,17 @@ ohci_alloc_intr_pipe(struct usbdevice_s *usbdev
}
// Add to interrupt schedule.
- barrier();
struct ohci_hcca *hcca = (void*)cntl->regs->hcca;
if (frameexp == 0) {
// Add to existing interrupt entry.
struct ohci_ed *intr_ed = (void*)hcca->int_table[0];
ed->hwNextED = intr_ed->hwNextED;
+ barrier();
intr_ed->hwNextED = (u32)ed;
} else {
int startpos = 1<<(frameexp-1);
ed->hwNextED = hcca->int_table[startpos];
+ barrier();
for (i=startpos; i<ARRAY_SIZE(hcca->int_table); i+=ms)
hcca->int_table[i] = (u32)ed;
}
--
1.7.6.5
More information about the SeaBIOS
mailing list