diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2011-10-09 19:57:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-10 14:21:26 -0400 |
commit | 134d0f974c55c942541f1663d51fa846257eff2a (patch) | |
tree | 2ea485354f8057eddacc96cdafd7434a503e300c /drivers | |
parent | c5d6136e10d667965e46f998c01863802f7b89c8 (diff) |
bnx2x: fix cl_id allocation for non-eth clients for NPAR mode
There are some consolidations of NPAR configuration
when FCoE and iSCSI L2 clients will get the same id,
in this case FCoE ring will be non-functional.
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2x/bnx2x.h | 18 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_cmn.h | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index e46df5331c55..9a7eb3b36cf3 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h | |||
@@ -239,13 +239,19 @@ void bnx2x_int_disable(struct bnx2x *bp); | |||
239 | * FUNC_N_CLID_X = N * NUM_SPECIAL_CLIENTS + FUNC_0_CLID_X | 239 | * FUNC_N_CLID_X = N * NUM_SPECIAL_CLIENTS + FUNC_0_CLID_X |
240 | * | 240 | * |
241 | */ | 241 | */ |
242 | /* iSCSI L2 */ | 242 | enum { |
243 | #define BNX2X_ISCSI_ETH_CL_ID_IDX 1 | 243 | BNX2X_ISCSI_ETH_CL_ID_IDX, |
244 | #define BNX2X_ISCSI_ETH_CID 49 | 244 | BNX2X_FCOE_ETH_CL_ID_IDX, |
245 | BNX2X_MAX_CNIC_ETH_CL_ID_IDX, | ||
246 | }; | ||
245 | 247 | ||
246 | /* FCoE L2 */ | 248 | #define BNX2X_CNIC_START_ETH_CID 48 |
247 | #define BNX2X_FCOE_ETH_CL_ID_IDX 2 | 249 | enum { |
248 | #define BNX2X_FCOE_ETH_CID 50 | 250 | /* iSCSI L2 */ |
251 | BNX2X_ISCSI_ETH_CID = BNX2X_CNIC_START_ETH_CID, | ||
252 | /* FCoE L2 */ | ||
253 | BNX2X_FCOE_ETH_CID, | ||
254 | }; | ||
249 | 255 | ||
250 | /** Additional rings budgeting */ | 256 | /** Additional rings budgeting */ |
251 | #ifdef BCM_CNIC | 257 | #ifdef BCM_CNIC |
diff --git a/drivers/net/bnx2x/bnx2x_cmn.h b/drivers/net/bnx2x/bnx2x_cmn.h index 223bfeebc597..2dc1199239d0 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.h +++ b/drivers/net/bnx2x/bnx2x_cmn.h | |||
@@ -1297,7 +1297,7 @@ static inline void bnx2x_init_txdata(struct bnx2x *bp, | |||
1297 | static inline u8 bnx2x_cnic_eth_cl_id(struct bnx2x *bp, u8 cl_idx) | 1297 | static inline u8 bnx2x_cnic_eth_cl_id(struct bnx2x *bp, u8 cl_idx) |
1298 | { | 1298 | { |
1299 | return bp->cnic_base_cl_id + cl_idx + | 1299 | return bp->cnic_base_cl_id + cl_idx + |
1300 | (bp->pf_num >> 1) * NON_ETH_CONTEXT_USE; | 1300 | (bp->pf_num >> 1) * BNX2X_MAX_CNIC_ETH_CL_ID_IDX; |
1301 | } | 1301 | } |
1302 | 1302 | ||
1303 | static inline u8 bnx2x_cnic_fw_sb_id(struct bnx2x *bp) | 1303 | static inline u8 bnx2x_cnic_fw_sb_id(struct bnx2x *bp) |