diff options
author | Vladislav Zolotarov <vladz@broadcom.com> | 2011-07-21 03:58:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 15:33:56 -0400 |
commit | 7961689586d30a34c10b18ac95ba1cd72cefe725 (patch) | |
tree | d80e394e9b5ca9b8835183a109060eda191e2be5 | |
parent | 8736c82650500222c031dd7f59f0126e59808e36 (diff) |
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>
-rw-r--r-- | drivers/net/bnx2x/bnx2x_cmn.c | 3 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_reg.h | 6 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_sp.c | 6 |
3 files changed, 12 insertions, 3 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) | |||
2042 | */ | 2042 | */ |
2043 | bnx2x_squeeze_objects(bp); | 2043 | bnx2x_squeeze_objects(bp); |
2044 | 2044 | ||
2045 | /* There should be no more pending SP commands at this stage */ | ||
2046 | bp->sp_state = 0; | ||
2047 | |||
2045 | bp->port.pmf = 0; | 2048 | bp->port.pmf = 0; |
2046 | 2049 | ||
2047 | /* Free SKBs, SGEs, TPA pool and driver internals */ | 2050 | /* Free SKBs, SGEs, TPA pool and driver internals */ |
diff --git a/drivers/net/bnx2x/bnx2x_reg.h b/drivers/net/bnx2x/bnx2x_reg.h index 1e6784b7734a..02461fef8751 100644 --- a/drivers/net/bnx2x/bnx2x_reg.h +++ b/drivers/net/bnx2x/bnx2x_reg.h | |||
@@ -371,7 +371,7 @@ | |||
371 | mechanism. The fields are: [5:0] - message length; [12:6] - message | 371 | mechanism. The fields are: [5:0] - message length; [12:6] - message |
372 | pointer; 18:13] - next pointer. */ | 372 | pointer; 18:13] - next pointer. */ |
373 | #define CCM_REG_XX_DESCR_TABLE 0xd0300 | 373 | #define CCM_REG_XX_DESCR_TABLE 0xd0300 |
374 | #define CCM_REG_XX_DESCR_TABLE_SIZE 36 | 374 | #define CCM_REG_XX_DESCR_TABLE_SIZE 24 |
375 | /* [R 7] Used to read the value of XX protection Free counter. */ | 375 | /* [R 7] Used to read the value of XX protection Free counter. */ |
376 | #define CCM_REG_XX_FREE 0xd0184 | 376 | #define CCM_REG_XX_FREE 0xd0184 |
377 | /* [RW 6] Initial value for the credit counter; responsible for fulfilling | 377 | /* [RW 6] Initial value for the credit counter; responsible for fulfilling |
@@ -4226,7 +4226,7 @@ | |||
4226 | mechanism. The fields are: [5:0] - length of the message; 15:6] - message | 4226 | mechanism. The fields are: [5:0] - length of the message; 15:6] - message |
4227 | pointer; 20:16] - next pointer. */ | 4227 | pointer; 20:16] - next pointer. */ |
4228 | #define TCM_REG_XX_DESCR_TABLE 0x50280 | 4228 | #define TCM_REG_XX_DESCR_TABLE 0x50280 |
4229 | #define TCM_REG_XX_DESCR_TABLE_SIZE 32 | 4229 | #define TCM_REG_XX_DESCR_TABLE_SIZE 29 |
4230 | /* [R 6] Use to read the value of XX protection Free counter. */ | 4230 | /* [R 6] Use to read the value of XX protection Free counter. */ |
4231 | #define TCM_REG_XX_FREE 0x50178 | 4231 | #define TCM_REG_XX_FREE 0x50178 |
4232 | /* [RW 6] Initial value for the credit counter; responsible for fulfilling | 4232 | /* [RW 6] Initial value for the credit counter; responsible for fulfilling |
@@ -4754,7 +4754,7 @@ | |||
4754 | mechanism. The fields are:[5:0] - message length; 14:6] - message | 4754 | mechanism. The fields are:[5:0] - message length; 14:6] - message |
4755 | pointer; 19:15] - next pointer. */ | 4755 | pointer; 19:15] - next pointer. */ |
4756 | #define UCM_REG_XX_DESCR_TABLE 0xe0280 | 4756 | #define UCM_REG_XX_DESCR_TABLE 0xe0280 |
4757 | #define UCM_REG_XX_DESCR_TABLE_SIZE 32 | 4757 | #define UCM_REG_XX_DESCR_TABLE_SIZE 27 |
4758 | /* [R 6] Use to read the XX protection Free counter. */ | 4758 | /* [R 6] Use to read the XX protection Free counter. */ |
4759 | #define UCM_REG_XX_FREE 0xe016c | 4759 | #define UCM_REG_XX_FREE 0xe016c |
4760 | /* [RW 6] Initial value for the credit counter; responsible for fulfilling | 4760 | /* [RW 6] Initial value for the credit counter; responsible for fulfilling |
diff --git a/drivers/net/bnx2x/bnx2x_sp.c b/drivers/net/bnx2x/bnx2x_sp.c index cce87d5e7609..df52f110c6c5 100644 --- a/drivers/net/bnx2x/bnx2x_sp.c +++ b/drivers/net/bnx2x/bnx2x_sp.c | |||
@@ -1689,6 +1689,12 @@ int bnx2x_config_vlan_mac( | |||
1689 | if (!bnx2x_exe_queue_empty(&o->exe_queue)) | 1689 | if (!bnx2x_exe_queue_empty(&o->exe_queue)) |
1690 | rc = 1; | 1690 | rc = 1; |
1691 | 1691 | ||
1692 | if (test_bit(RAMROD_DRV_CLR_ONLY, ramrod_flags)) { | ||
1693 | DP(BNX2X_MSG_SP, "RAMROD_DRV_CLR_ONLY requested: " | ||
1694 | "clearing a pending bit.\n"); | ||
1695 | raw->clear_pending(raw); | ||
1696 | } | ||
1697 | |||
1692 | /* Execute commands if required */ | 1698 | /* Execute commands if required */ |
1693 | if (cont || test_bit(RAMROD_EXEC, ramrod_flags) || | 1699 | if (cont || test_bit(RAMROD_EXEC, ramrod_flags) || |
1694 | test_bit(RAMROD_COMP_WAIT, ramrod_flags)) { | 1700 | test_bit(RAMROD_COMP_WAIT, ramrod_flags)) { |