Commit 1a4e74a0 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan Committed by Roland Dreier

IB/ipath: Fix EEPROM read when driver is compiled with -Os

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: default avatarBryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 89d1e09b
...@@ -187,6 +187,7 @@ static int i2c_gpio_get(struct ipath_devdata *dd, ...@@ -187,6 +187,7 @@ static int i2c_gpio_get(struct ipath_devdata *dd,
static void i2c_wait_for_writes(struct ipath_devdata *dd) static void i2c_wait_for_writes(struct ipath_devdata *dd)
{ {
(void)ipath_read_kreg32(dd, dd->ipath_kregs->kr_scratch); (void)ipath_read_kreg32(dd, dd->ipath_kregs->kr_scratch);
rmb();
} }
static void scl_out(struct ipath_devdata *dd, u8 bit) static void scl_out(struct ipath_devdata *dd, u8 bit)
......
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