From: Vladislav Zolotarov <vladz@broadcom.com>
Date: Tue, 19 Jul 2011 01:39:41 +0000
Subject: [PATCH 04/57] bnx2x: stop tx before CNIC_STOP
Git-commit: 9505ee376739c26cf1d7d4e551d2f63b9d7e5729
Patch-mainline: v3.1-rc1
References: bnc#709064

It may take some time to cnic to respond, this prevents tx_timeout
when it happens.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Mahoney <jeffm@suse.com>
---
 drivers/net/bnx2x/bnx2x_cmn.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 3b88112..bea6582 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -1988,6 +1988,9 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
 		return -EINVAL;
 	}
 
+	/* Stop Tx */
+	bnx2x_tx_disable(bp);
+
 #ifdef BCM_CNIC
 	bnx2x_cnic_notify(bp, CNIC_CTL_STOP_CMD);
 #endif
@@ -1996,9 +1999,6 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
 
 	bp->rx_mode = BNX2X_RX_MODE_NONE;
 
-	/* Stop Tx */
-	bnx2x_tx_disable(bp);
-
 	del_timer_sync(&bp->timer);
 
 	/* Set ALWAYS_ALIVE bit in shmem */
-- 
1.7.2.2


