summaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_cmn.c
diff options
context:
space:
mode:
authorVladislav Zolotarov2011-07-21 09:58:54 +0200
committerDavid S. Miller2011-07-21 21:33:56 +0200
commit7961689586d30a34c10b18ac95ba1cd72cefe725 (patch)
treed80e394e9b5ca9b8835183a109060eda191e2be5 /drivers/net/bnx2x/bnx2x_cmn.c
parentbnx2x: Parity errors recovery for 578xx (diff)
downloadkernel-qcow2-linux-7961689586d30a34c10b18ac95ba1cd72cefe725.tar.gz
kernel-qcow2-linux-7961689586d30a34c10b18ac95ba1cd72cefe725.tar.xz
kernel-qcow2-linux-7961689586d30a34c10b18ac95ba1cd72cefe725.zip
bnx2x: Broken self-test in SF mode on 578xx
This patch fixes both the failure in the self-test on 578xx and a hole in a parity recovery flow that this failure has discovered: - internal 'pending' state in a VLAN_MAC object wasn't been cleared when the object state change was called with DRV_ONLY flag, which in particular happens when a parity error happens during the self-test. - bp->sp_state wasn't cleared in the similar circumstances as described above. Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_cmn.c')
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 3aadc306c8d2..5b0dba6d4efa 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -2042,6 +2042,9 @@ int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
*/
bnx2x_squeeze_objects(bp);
+ /* There should be no more pending SP commands at this stage */
+ bp->sp_state = 0;
+
bp->port.pmf = 0;
/* Free SKBs, SGEs, TPA pool and driver internals */