diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2011-07-19 20:56:21 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-08-04 07:59:07 -0400 |
commit | 945a51517cc0bd9e461f2018624dfc1faef9ddee (patch) | |
tree | 5782ffe27f3fb8f5b4cbc19ffe7b74bff36c6a05 /drivers/net/igbvf | |
parent | d3e614577198757d5854caa912e88f2d4296479b (diff) |
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>
Diffstat (limited to 'drivers/net/igbvf')
-rw-r--r-- | drivers/net/igbvf/netdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 1330c8e932da..40ed066e3ef4 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -1226,6 +1226,7 @@ static void igbvf_configure_tx(struct igbvf_adapter *adapter) | |||
1226 | /* disable transmits */ | 1226 | /* disable transmits */ |
1227 | txdctl = er32(TXDCTL(0)); | 1227 | txdctl = er32(TXDCTL(0)); |
1228 | ew32(TXDCTL(0), txdctl & ~E1000_TXDCTL_QUEUE_ENABLE); | 1228 | ew32(TXDCTL(0), txdctl & ~E1000_TXDCTL_QUEUE_ENABLE); |
1229 | e1e_flush(); | ||
1229 | msleep(10); | 1230 | msleep(10); |
1230 | 1231 | ||
1231 | /* Setup the HW Tx Head and Tail descriptor pointers */ | 1232 | /* Setup the HW Tx Head and Tail descriptor pointers */ |
@@ -1306,6 +1307,7 @@ static void igbvf_configure_rx(struct igbvf_adapter *adapter) | |||
1306 | /* disable receives */ | 1307 | /* disable receives */ |
1307 | rxdctl = er32(RXDCTL(0)); | 1308 | rxdctl = er32(RXDCTL(0)); |
1308 | ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE); | 1309 | ew32(RXDCTL(0), rxdctl & ~E1000_RXDCTL_QUEUE_ENABLE); |
1310 | e1e_flush(); | ||
1309 | msleep(10); | 1311 | msleep(10); |
1310 | 1312 | ||
1311 | rdlen = rx_ring->count * sizeof(union e1000_adv_rx_desc); | 1313 | rdlen = rx_ring->count * sizeof(union e1000_adv_rx_desc); |