]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/ipath: Fix EEPROM read when driver is compiled with -Os
authorBryan O'Sullivan <bos@pathscale.com>
Thu, 28 Sep 2006 16:00:19 +0000 (09:00 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 28 Sep 2006 18:17:05 +0000 (11:17 -0700)
The EEPROM is read via programmable I/O pins. When the driver
is compiled -Os, the CPU can speculatively read the I/O
value before it is valid.  This patch fixes the problem.

Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_eeprom.c

index c8cfda89cb36e4f4d1506d1f8abccfb354cd6fb9..a4019a6b75602c760ef5774ed2216cd33b9d6576 100644 (file)
@@ -187,6 +187,7 @@ bail:
 static void i2c_wait_for_writes(struct ipath_devdata *dd)
 {
        (void)ipath_read_kreg32(dd, dd->ipath_kregs->kr_scratch);
+       rmb();
 }
 
 static void scl_out(struct ipath_devdata *dd, u8 bit)