netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] be2net: fix disabling TX in be_close()
@ 2013-08-21 10:22 Sathya Perla
  2013-08-21 14:48 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Sathya Perla @ 2013-08-21 10:22 UTC (permalink / raw)
  To: netdev

commit fba875591 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>
---
 drivers/net/ethernet/emulex/benet/be_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 
-- 
1.8.3.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] be2net: fix disabling TX in be_close()
  2013-08-21 10:22 [PATCH] be2net: fix disabling TX in be_close() Sathya Perla
@ 2013-08-21 14:48 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2013-08-21 14:48 UTC (permalink / raw)
  To: Sathya Perla; +Cc: netdev

Hello.

On 21-08-2013 14:22, Sathya Perla wrote:

> commit fba875591 disabled TX in be_close() to protect be_xmit() from

    Please also specify that commit's summary line in parens.

> 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>

WBR, Sergei

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-21 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21 10:22 [PATCH] be2net: fix disabling TX in be_close() Sathya Perla
2013-08-21 14:48 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).