aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2011-07-20 10:55:22 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-21 15:38:32 -0400
commitb37a41e390310429d4171b0f7b6c6eab04512dc0 (patch)
tree9ed5dcbfb441a022580eb2838078a74dca4bee6a /drivers
parentbda18faf630ae3731f4b4e8f4b94a26e326c4797 (diff)
cnic: Fix Context ID space calculation
Include FCoE CID space only for E2_PLUS devices. Remove old CID offset adjustments that are no longer needed. Signed-off-by: Michael Chan <mchan@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/cnic.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index ea75f65a179..455fd0dacb3 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -1172,7 +1172,7 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
1172 1172
1173 cp->iro_arr = ethdev->iro_arr; 1173 cp->iro_arr = ethdev->iro_arr;
1174 1174
1175 cp->max_cid_space = MAX_ISCSI_TBL_SZ + BNX2X_FCOE_NUM_CONNECTIONS; 1175 cp->max_cid_space = MAX_ISCSI_TBL_SZ;
1176 cp->iscsi_start_cid = start_cid; 1176 cp->iscsi_start_cid = start_cid;
1177 cp->fcoe_start_cid = start_cid + MAX_ISCSI_TBL_SZ; 1177 cp->fcoe_start_cid = start_cid + MAX_ISCSI_TBL_SZ;
1178 1178
@@ -1183,14 +1183,6 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
1183 cp->fcoe_init_cid = 0x10; 1183 cp->fcoe_init_cid = 0x10;
1184 } 1184 }
1185 1185
1186 if (start_cid < BNX2X_ISCSI_START_CID) {
1187 u32 delta = BNX2X_ISCSI_START_CID - start_cid;
1188
1189 cp->iscsi_start_cid = BNX2X_ISCSI_START_CID;
1190 cp->fcoe_start_cid += delta;
1191 cp->max_cid_space += delta;
1192 }
1193
1194 cp->iscsi_tbl = kzalloc(sizeof(struct cnic_iscsi) * MAX_ISCSI_TBL_SZ, 1186 cp->iscsi_tbl = kzalloc(sizeof(struct cnic_iscsi) * MAX_ISCSI_TBL_SZ,
1195 GFP_KERNEL); 1187 GFP_KERNEL);
1196 if (!cp->iscsi_tbl) 1188 if (!cp->iscsi_tbl)