Skip to content

Commit

Permalink
IB/ipath: Fix EEPROM read when driver is compiled with -Os
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bryan O'Sullivan authored and Roland Dreier committed Sep 28, 2006
1 parent 89d1e09 commit 1a4e74a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/hw/ipath/ipath_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ static int i2c_gpio_get(struct ipath_devdata *dd,
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)
Expand Down

0 comments on commit 1a4e74a

Please sign in to comment.