aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2012-03-21 11:38:34 -0400
committerDavid S. Miller <davem@davemloft.net>2012-03-21 21:57:36 -0400
commit8ec3e70207486bbd3e2d3c0d6b809116ccd4f219 (patch)
treebda290a8c461fe639fe99a7210e75615c1bef03d /drivers
parent7ae5289017e5ed5514b2603d157fb54c058a3c82 (diff)
cnic: Fix parity error code conflict
The recently added parity error handling used an error code that was already defined for a different error. This could lead to bnx2x firmware assert. We need to fix this with new error codes that are defined for parity error only. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/cnic.c12
-rw-r--r--drivers/net/ethernet/broadcom/cnic_defs.h28
-rw-r--r--drivers/net/ethernet/broadcom/cnic_if.h4
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_constants.h1
-rw-r--r--drivers/scsi/bnx2i/57xx_iscsi_constants.h1
5 files changed, 12 insertions, 34 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index 7b65716b8734..c95e7b5e2b85 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -47,6 +47,7 @@
47#include "bnx2x/bnx2x_hsi.h" 47#include "bnx2x/bnx2x_hsi.h"
48#include "../../../scsi/bnx2i/57xx_iscsi_constants.h" 48#include "../../../scsi/bnx2i/57xx_iscsi_constants.h"
49#include "../../../scsi/bnx2i/57xx_iscsi_hsi.h" 49#include "../../../scsi/bnx2i/57xx_iscsi_hsi.h"
50#include "../../../scsi/bnx2fc/bnx2fc_constants.h"
50#include "cnic.h" 51#include "cnic.h"
51#include "cnic_defs.h" 52#include "cnic_defs.h"
52 53
@@ -2547,7 +2548,7 @@ static void cnic_bnx2x_kwqe_err(struct cnic_dev *dev, struct kwqe *kwqe)
2547 } 2548 }
2548 kcqe.kcqe_op_flag = kcqe_op << KCQE_FLAGS_OPCODE_SHIFT; 2549 kcqe.kcqe_op_flag = kcqe_op << KCQE_FLAGS_OPCODE_SHIFT;
2549 kcqe.kcqe_op_flag |= KCQE_FLAGS_LAYER_MASK_L5_FCOE; 2550 kcqe.kcqe_op_flag |= KCQE_FLAGS_LAYER_MASK_L5_FCOE;
2550 kcqe.kcqe_info1 = FCOE_KCQE_COMPLETION_STATUS_NIC_ERROR; 2551 kcqe.kcqe_info1 = FCOE_KCQE_COMPLETION_STATUS_PARITY_ERROR;
2551 kcqe.kcqe_info2 = cid; 2552 kcqe.kcqe_info2 = cid;
2552 kcqe.kcqe_info0 = l5_cid; 2553 kcqe.kcqe_info0 = l5_cid;
2553 2554
@@ -2558,7 +2559,7 @@ static void cnic_bnx2x_kwqe_err(struct cnic_dev *dev, struct kwqe *kwqe)
2558 2559
2559 kcqe.kcqe_op_flag = (opcode + 0x10) << KCQE_FLAGS_OPCODE_SHIFT; 2560 kcqe.kcqe_op_flag = (opcode + 0x10) << KCQE_FLAGS_OPCODE_SHIFT;
2560 kcqe.kcqe_op_flag |= KCQE_FLAGS_LAYER_MASK_L5_ISCSI; 2561 kcqe.kcqe_op_flag |= KCQE_FLAGS_LAYER_MASK_L5_ISCSI;
2561 kcqe.kcqe_info1 = ISCSI_KCQE_COMPLETION_STATUS_NIC_ERROR; 2562 kcqe.kcqe_info1 = ISCSI_KCQE_COMPLETION_STATUS_PARITY_ERR;
2562 kcqe.kcqe_info2 = cid; 2563 kcqe.kcqe_info2 = cid;
2563 cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &kcqe.kcqe_info0); 2564 cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &kcqe.kcqe_info0);
2564 2565
@@ -2577,7 +2578,7 @@ static void cnic_bnx2x_kwqe_err(struct cnic_dev *dev, struct kwqe *kwqe)
2577 2578
2578 kcqe.kcqe_op_flag = (kcqe_op << KCQE_FLAGS_OPCODE_SHIFT) | 2579 kcqe.kcqe_op_flag = (kcqe_op << KCQE_FLAGS_OPCODE_SHIFT) |
2579 KCQE_FLAGS_LAYER_MASK_L4; 2580 KCQE_FLAGS_LAYER_MASK_L4;
2580 l4kcqe->status = L4_KCQE_COMPLETION_STATUS_NIC_ERROR; 2581 l4kcqe->status = L4_KCQE_COMPLETION_STATUS_PARITY_ERROR;
2581 l4kcqe->cid = cid; 2582 l4kcqe->cid = cid;
2582 cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &l4kcqe->conn_id); 2583 cnic_get_l5_cid(cp, BNX2X_SW_CID(cid), &l4kcqe->conn_id);
2583 } else { 2584 } else {
@@ -3933,7 +3934,8 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
3933 case L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE: 3934 case L4_KCQE_OPCODE_VALUE_CONNECT_COMPLETE:
3934 if (l4kcqe->status == 0) 3935 if (l4kcqe->status == 0)
3935 set_bit(SK_F_OFFLD_COMPLETE, &csk->flags); 3936 set_bit(SK_F_OFFLD_COMPLETE, &csk->flags);
3936 else if (l4kcqe->status == L4_KCQE_COMPLETION_STATUS_NIC_ERROR) 3937 else if (l4kcqe->status ==
3938 L4_KCQE_COMPLETION_STATUS_PARITY_ERROR)
3937 set_bit(SK_F_HW_ERR, &csk->flags); 3939 set_bit(SK_F_HW_ERR, &csk->flags);
3938 3940
3939 smp_mb__before_clear_bit(); 3941 smp_mb__before_clear_bit();
@@ -3946,7 +3948,7 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
3946 case L4_KCQE_OPCODE_VALUE_RESET_COMP: 3948 case L4_KCQE_OPCODE_VALUE_RESET_COMP:
3947 case L5CM_RAMROD_CMD_ID_SEARCHER_DELETE: 3949 case L5CM_RAMROD_CMD_ID_SEARCHER_DELETE:
3948 case L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD: 3950 case L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD:
3949 if (l4kcqe->status == L4_KCQE_COMPLETION_STATUS_NIC_ERROR) 3951 if (l4kcqe->status == L4_KCQE_COMPLETION_STATUS_PARITY_ERROR)
3950 set_bit(SK_F_HW_ERR, &csk->flags); 3952 set_bit(SK_F_HW_ERR, &csk->flags);
3951 3953
3952 cp->close_conn(csk, opcode); 3954 cp->close_conn(csk, opcode);
diff --git a/drivers/net/ethernet/broadcom/cnic_defs.h b/drivers/net/ethernet/broadcom/cnic_defs.h
index 06ca00266d70..382c98b0cc0c 100644
--- a/drivers/net/ethernet/broadcom/cnic_defs.h
+++ b/drivers/net/ethernet/broadcom/cnic_defs.h
@@ -35,16 +35,6 @@
35#define L5CM_RAMROD_CMD_ID_SEARCHER_DELETE (L5CM_RAMROD_CMD_ID_BASE + 14) 35#define L5CM_RAMROD_CMD_ID_SEARCHER_DELETE (L5CM_RAMROD_CMD_ID_BASE + 14)
36#define L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD (L5CM_RAMROD_CMD_ID_BASE + 15) 36#define L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD (L5CM_RAMROD_CMD_ID_BASE + 15)
37 37
38#define FCOE_KCQE_OPCODE_INIT_FUNC (0x10)
39#define FCOE_KCQE_OPCODE_DESTROY_FUNC (0x11)
40#define FCOE_KCQE_OPCODE_STAT_FUNC (0x12)
41#define FCOE_KCQE_OPCODE_OFFLOAD_CONN (0x15)
42#define FCOE_KCQE_OPCODE_ENABLE_CONN (0x16)
43#define FCOE_KCQE_OPCODE_DISABLE_CONN (0x17)
44#define FCOE_KCQE_OPCODE_DESTROY_CONN (0x18)
45#define FCOE_KCQE_OPCODE_CQ_EVENT_NOTIFICATION (0x20)
46#define FCOE_KCQE_OPCODE_FCOE_ERROR (0x21)
47
48#define FCOE_RAMROD_CMD_ID_INIT_FUNC (FCOE_KCQE_OPCODE_INIT_FUNC) 38#define FCOE_RAMROD_CMD_ID_INIT_FUNC (FCOE_KCQE_OPCODE_INIT_FUNC)
49#define FCOE_RAMROD_CMD_ID_DESTROY_FUNC (FCOE_KCQE_OPCODE_DESTROY_FUNC) 39#define FCOE_RAMROD_CMD_ID_DESTROY_FUNC (FCOE_KCQE_OPCODE_DESTROY_FUNC)
50#define FCOE_RAMROD_CMD_ID_STAT_FUNC (FCOE_KCQE_OPCODE_STAT_FUNC) 40#define FCOE_RAMROD_CMD_ID_STAT_FUNC (FCOE_KCQE_OPCODE_STAT_FUNC)
@@ -54,23 +44,6 @@
54#define FCOE_RAMROD_CMD_ID_DESTROY_CONN (FCOE_KCQE_OPCODE_DESTROY_CONN) 44#define FCOE_RAMROD_CMD_ID_DESTROY_CONN (FCOE_KCQE_OPCODE_DESTROY_CONN)
55#define FCOE_RAMROD_CMD_ID_TERMINATE_CONN (0x81) 45#define FCOE_RAMROD_CMD_ID_TERMINATE_CONN (0x81)
56 46
57#define FCOE_KWQE_OPCODE_INIT1 (0)
58#define FCOE_KWQE_OPCODE_INIT2 (1)
59#define FCOE_KWQE_OPCODE_INIT3 (2)
60#define FCOE_KWQE_OPCODE_OFFLOAD_CONN1 (3)
61#define FCOE_KWQE_OPCODE_OFFLOAD_CONN2 (4)
62#define FCOE_KWQE_OPCODE_OFFLOAD_CONN3 (5)
63#define FCOE_KWQE_OPCODE_OFFLOAD_CONN4 (6)
64#define FCOE_KWQE_OPCODE_ENABLE_CONN (7)
65#define FCOE_KWQE_OPCODE_DISABLE_CONN (8)
66#define FCOE_KWQE_OPCODE_DESTROY_CONN (9)
67#define FCOE_KWQE_OPCODE_DESTROY (10)
68#define FCOE_KWQE_OPCODE_STAT (11)
69
70#define FCOE_KCQE_COMPLETION_STATUS_ERROR (0x1)
71#define FCOE_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAILURE (0x3)
72#define FCOE_KCQE_COMPLETION_STATUS_NIC_ERROR (0x5)
73
74/* KCQ (kernel completion queue) response op codes */ 47/* KCQ (kernel completion queue) response op codes */
75#define L4_KCQE_OPCODE_VALUE_CLOSE_COMP (53) 48#define L4_KCQE_OPCODE_VALUE_CLOSE_COMP (53)
76#define L4_KCQE_OPCODE_VALUE_RESET_COMP (54) 49#define L4_KCQE_OPCODE_VALUE_RESET_COMP (54)
@@ -87,6 +60,7 @@
87/* KCQ (kernel completion queue) completion status */ 60/* KCQ (kernel completion queue) completion status */
88#define L4_KCQE_COMPLETION_STATUS_SUCCESS (0) 61#define L4_KCQE_COMPLETION_STATUS_SUCCESS (0)
89#define L4_KCQE_COMPLETION_STATUS_NIC_ERROR (4) 62#define L4_KCQE_COMPLETION_STATUS_NIC_ERROR (4)
63#define L4_KCQE_COMPLETION_STATUS_PARITY_ERROR (0x81)
90#define L4_KCQE_COMPLETION_STATUS_TIMEOUT (0x93) 64#define L4_KCQE_COMPLETION_STATUS_TIMEOUT (0x93)
91 65
92#define L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL (0x83) 66#define L4_KCQE_COMPLETION_STATUS_CTX_ALLOC_FAIL (0x83)
diff --git a/drivers/net/ethernet/broadcom/cnic_if.h b/drivers/net/ethernet/broadcom/cnic_if.h
index 60deb84d36bd..289274e546be 100644
--- a/drivers/net/ethernet/broadcom/cnic_if.h
+++ b/drivers/net/ethernet/broadcom/cnic_if.h
@@ -12,8 +12,8 @@
12#ifndef CNIC_IF_H 12#ifndef CNIC_IF_H
13#define CNIC_IF_H 13#define CNIC_IF_H
14 14
15#define CNIC_MODULE_VERSION "2.5.9" 15#define CNIC_MODULE_VERSION "2.5.10"
16#define CNIC_MODULE_RELDATE "Feb 8, 2012" 16#define CNIC_MODULE_RELDATE "March 21, 2012"
17 17
18#define CNIC_ULP_RDMA 0 18#define CNIC_ULP_RDMA 0
19#define CNIC_ULP_ISCSI 1 19#define CNIC_ULP_ISCSI 1
diff --git a/drivers/scsi/bnx2fc/bnx2fc_constants.h b/drivers/scsi/bnx2fc/bnx2fc_constants.h
index c12702bb16d6..dad9924abbbb 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_constants.h
+++ b/drivers/scsi/bnx2fc/bnx2fc_constants.h
@@ -47,6 +47,7 @@
47#define FCOE_KCQE_COMPLETION_STATUS_CTX_FREE_FAILURE (0x4) 47#define FCOE_KCQE_COMPLETION_STATUS_CTX_FREE_FAILURE (0x4)
48#define FCOE_KCQE_COMPLETION_STATUS_NIC_ERROR (0x5) 48#define FCOE_KCQE_COMPLETION_STATUS_NIC_ERROR (0x5)
49#define FCOE_KCQE_COMPLETION_STATUS_WRONG_HSI_VERSION (0x6) 49#define FCOE_KCQE_COMPLETION_STATUS_WRONG_HSI_VERSION (0x6)
50#define FCOE_KCQE_COMPLETION_STATUS_PARITY_ERROR (0x81)
50 51
51/* CQE type */ 52/* CQE type */
52#define FCOE_PENDING_CQE_TYPE 0 53#define FCOE_PENDING_CQE_TYPE 0
diff --git a/drivers/scsi/bnx2i/57xx_iscsi_constants.h b/drivers/scsi/bnx2i/57xx_iscsi_constants.h
index 57515f1f1690..495a841645f9 100644
--- a/drivers/scsi/bnx2i/57xx_iscsi_constants.h
+++ b/drivers/scsi/bnx2i/57xx_iscsi_constants.h
@@ -122,6 +122,7 @@
122#define ISCSI_KCQE_COMPLETION_STATUS_LOM_ISCSI_NOT_ENABLED (0x51) 122#define ISCSI_KCQE_COMPLETION_STATUS_LOM_ISCSI_NOT_ENABLED (0x51)
123 123
124#define ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY (0x80) 124#define ISCSI_KCQE_COMPLETION_STATUS_CID_BUSY (0x80)
125#define ISCSI_KCQE_COMPLETION_STATUS_PARITY_ERR (0x81)
125 126
126/* SQ/RQ/CQ DB structure sizes */ 127/* SQ/RQ/CQ DB structure sizes */
127#define ISCSI_SQ_DB_SIZE (16) 128#define ISCSI_SQ_DB_SIZE (16)