intel drivers: repair missing flush operations
after review of all intel drivers, found several instances where drivers had the incorrect pattern of: memory mapped write(); delay(); which should always be: memory mapped write(); write flush(); /* aka memory mapped read */ delay(); explanation: The reason for including the flush is that writes can be held (posted) in PCI/PCIe bridges, but the read always has to complete synchronously and therefore has to flush all pending writes to a device. If a write is held and followed by a delay, the delay means nothing because the write may not have reached hardware (maybe even not until the next read) Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
committed by
Jeff Kirsher
parent
d3e6145771
commit
945a51517c
@@ -1225,6 +1225,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
|
||||
|
||||
/* Disable all the interrupts */
|
||||
wr32(E1000_IMC, ~0);
|
||||
wrfl();
|
||||
msleep(10);
|
||||
|
||||
/* Define all writable bits for ICS */
|
||||
@@ -1268,6 +1269,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
|
||||
|
||||
wr32(E1000_IMC, mask);
|
||||
wr32(E1000_ICS, mask);
|
||||
wrfl();
|
||||
msleep(10);
|
||||
|
||||
if (adapter->test_icr & mask) {
|
||||
@@ -1289,6 +1291,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
|
||||
|
||||
wr32(E1000_IMS, mask);
|
||||
wr32(E1000_ICS, mask);
|
||||
wrfl();
|
||||
msleep(10);
|
||||
|
||||
if (!(adapter->test_icr & mask)) {
|
||||
@@ -1310,6 +1313,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
|
||||
|
||||
wr32(E1000_IMC, ~mask);
|
||||
wr32(E1000_ICS, ~mask);
|
||||
wrfl();
|
||||
msleep(10);
|
||||
|
||||
if (adapter->test_icr & mask) {
|
||||
@@ -1321,6 +1325,7 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
|
||||
|
||||
/* Disable all the interrupts */
|
||||
wr32(E1000_IMC, ~0);
|
||||
wrfl();
|
||||
msleep(10);
|
||||
|
||||
/* Unhook test interrupt handler */
|
||||
|
Reference in New Issue
Block a user