]> xenbits.xensource.com Git - seabios.git/commitdiff
usb: Fix barrier() placement in OHCI interrupt schedule add.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 10 Mar 2012 17:30:27 +0000 (12:30 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 11 Mar 2012 02:05:15 +0000 (21:05 -0500)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/usb-ohci.c

index 9980a8e9d4cc6b690c1c205c621348b52aa28a68..b0d03650521b79578c367e8b498ba002a37f6248 100644 (file)
@@ -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;
     }