Message ID | 1377154421-32013-1-git-send-email-sathya.perla@emulex.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Sathya Perla <sathya.perla@emulex.com> Date: Thu, 22 Aug 2013 12:23:41 +0530 > commit fba875591 ("disable TX in be_close()") disabled TX in be_close() > to protect be_xmit() from touching freed up queues in the AER recovery > flow. But, TX must be disabled *before* cleaning up TX completions in > the close() path, not after. This allows be_tx_compl_clean() to free up > all TX-req skbs that were notified to the HW. > > Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Applied and queued up for -stable. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 181edb5..4559c35 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -2563,8 +2563,8 @@ static int be_close(struct net_device *netdev) /* Wait for all pending tx completions to arrive so that * all tx skbs are freed. */ - be_tx_compl_clean(adapter); netif_tx_disable(netdev); + be_tx_compl_clean(adapter); be_rx_qs_destroy(adapter);
commit fba875591 ("disable TX in be_close()") disabled TX in be_close() to protect be_xmit() from touching freed up queues in the AER recovery flow. But, TX must be disabled *before* cleaning up TX completions in the close() path, not after. This allows be_tx_compl_clean() to free up all TX-req skbs that were notified to the HW. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> --- Re-sending the patch with summary line of the commit referenced in the change log. drivers/net/ethernet/emulex/benet/be_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)