Skip to content

Commit

Permalink
bnx2x: don't wait for Tx completion on recovery
Browse files Browse the repository at this point in the history
When driver has hit a parity event, HW can no longer write to host memory.
As a result, Tx completions cannot be written to the host SB memory, and
waiting for Tx completions eventually timeout.
As driver is willing to delay as much as 1-2 seconds per Tx queue for its
draining and this delay is sequential, the time to recover might greatly
lengthen needlessly in case the recovery is done under multi-connection
traffic.

Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yuval Mintz authored and David S. Miller committed Mar 16, 2016
1 parent 489ce5f commit d78a1f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3042,8 +3042,12 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode, bool keep_link)
bnx2x_save_statistics(bp);
}

/* wait till consumers catch up with producers in all queues */
bnx2x_drain_tx_queues(bp);
/* wait till consumers catch up with producers in all queues.
* If we're recovering, FW can't write to host so no reason
* to wait for the queues to complete all Tx.
*/
if (unload_mode != UNLOAD_RECOVERY)
bnx2x_drain_tx_queues(bp);

/* if VF indicate to PF this function is going down (PF will delete sp
* elements and clear initializations
Expand Down

0 comments on commit d78a1f0

Please sign in to comment.