diff options
Diffstat (limited to 'drivers/scsi/be2iscsi/be_mgmt.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_mgmt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 79c2bd525a84..df1b327fe17b 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c | |||
@@ -48,6 +48,14 @@ unsigned char mgmt_get_fw_config(struct be_ctrl_info *ctrl, | |||
48 | pfw_cfg->ulp[0].sq_base; | 48 | pfw_cfg->ulp[0].sq_base; |
49 | phba->fw_config.iscsi_cid_count = | 49 | phba->fw_config.iscsi_cid_count = |
50 | pfw_cfg->ulp[0].sq_count; | 50 | pfw_cfg->ulp[0].sq_count; |
51 | if (phba->fw_config.iscsi_cid_count > (BE2_MAX_SESSIONS / 2)) { | ||
52 | status = 1; | ||
53 | shost_printk(KERN_WARNING, phba->shost, | ||
54 | "FW reported MAX CXNS as %d \t" | ||
55 | "Max Supported = %d. Failing to load \n", | ||
56 | phba->fw_config.iscsi_cid_count, | ||
57 | BE2_MAX_SESSIONS); | ||
58 | } | ||
51 | } else { | 59 | } else { |
52 | shost_printk(KERN_WARNING, phba->shost, | 60 | shost_printk(KERN_WARNING, phba->shost, |
53 | "Failed in mgmt_get_fw_config \n"); | 61 | "Failed in mgmt_get_fw_config \n"); |
@@ -317,7 +325,8 @@ int mgmt_open_connection(struct beiscsi_hba *phba, | |||
317 | struct tcp_connect_and_offload_out *ptcpcnct_out = | 325 | struct tcp_connect_and_offload_out *ptcpcnct_out = |
318 | embedded_payload(wrb); | 326 | embedded_payload(wrb); |
319 | 327 | ||
320 | ep = phba->ep_array[ptcpcnct_out->cid]; | 328 | ep = phba->ep_array[ptcpcnct_out->cid - |
329 | phba->fw_config.iscsi_cid_start]; | ||
321 | beiscsi_ep = ep->dd_data; | 330 | beiscsi_ep = ep->dd_data; |
322 | beiscsi_ep->fw_handle = ptcpcnct_out->connection_handle; | 331 | beiscsi_ep->fw_handle = ptcpcnct_out->connection_handle; |
323 | beiscsi_ep->cid_vld = 1; | 332 | beiscsi_ep->cid_vld = 1; |