igb: Wait 10ms just once after TX queues reset

Move 10ms sleep out of function resetting TX queue.
Reset all the TX queues in one turn and
wait for all of them just once.

Use usleep_range() instead of mdelay() in order not to
affect transmission on other interfaces.

Signed-off-by: Sergey Nemov <sergey.nemov@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:
Sergey Nemov 2018-05-18 11:58:40 +02:00 committed by Jeff Kirsher
parent 1ec2297c5c
commit 06140c793d
1 changed files with 8 additions and 5 deletions

View File

@ -4055,11 +4055,6 @@ void igb_configure_tx_ring(struct igb_adapter *adapter,
u64 tdba = ring->dma; u64 tdba = ring->dma;
int reg_idx = ring->reg_idx; int reg_idx = ring->reg_idx;
/* disable the queue */
wr32(E1000_TXDCTL(reg_idx), 0);
wrfl();
mdelay(10);
wr32(E1000_TDLEN(reg_idx), wr32(E1000_TDLEN(reg_idx),
ring->count * sizeof(union e1000_adv_tx_desc)); ring->count * sizeof(union e1000_adv_tx_desc));
wr32(E1000_TDBAL(reg_idx), wr32(E1000_TDBAL(reg_idx),
@ -4090,8 +4085,16 @@ void igb_configure_tx_ring(struct igb_adapter *adapter,
**/ **/
static void igb_configure_tx(struct igb_adapter *adapter) static void igb_configure_tx(struct igb_adapter *adapter)
{ {
struct e1000_hw *hw = &adapter->hw;
int i; int i;
/* disable the queues */
for (i = 0; i < adapter->num_tx_queues; i++)
wr32(E1000_TXDCTL(adapter->tx_ring[i]->reg_idx), 0);
wrfl();
usleep_range(10000, 20000);
for (i = 0; i < adapter->num_tx_queues; i++) for (i = 0; i < adapter->num_tx_queues; i++)
igb_configure_tx_ring(adapter, adapter->tx_ring[i]); igb_configure_tx_ring(adapter, adapter->tx_ring[i]);
} }