diff options
author | Jayamohan Kallickal <jayamohank@serverengines.com> | 2010-01-04 23:34:12 (GMT) |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-01-18 16:48:17 (GMT) |
commit | 7da5087971b1a187f92be4efb74a991ac9ccb0a3 (patch) | |
tree | 98daec2de829bc1c1c4f549e07c426a86f22b034 /drivers/scsi/be2iscsi/be_mgmt.c | |
parent | 1fe6dbf4d0afba52ad0249f398e6296a1433a004 (diff) | |
download | linux-7da5087971b1a187f92be4efb74a991ac9ccb0a3.tar.xz |
[SCSI] be2iscsi: Use start cid and number of cid and icd from FW
This patch enablesi be2iscsi to use the start number and number
of cids/icd provided by FW rather than hard coded values.
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
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 79c2bd5..df1b327 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, pfw_cfg->ulp[0].sq_base; phba->fw_config.iscsi_cid_count = pfw_cfg->ulp[0].sq_count; + if (phba->fw_config.iscsi_cid_count > (BE2_MAX_SESSIONS / 2)) { + status = 1; + shost_printk(KERN_WARNING, phba->shost, + "FW reported MAX CXNS as %d \t" + "Max Supported = %d. Failing to load \n", + phba->fw_config.iscsi_cid_count, + BE2_MAX_SESSIONS); + } } else { shost_printk(KERN_WARNING, phba->shost, "Failed in mgmt_get_fw_config \n"); @@ -317,7 +325,8 @@ int mgmt_open_connection(struct beiscsi_hba *phba, struct tcp_connect_and_offload_out *ptcpcnct_out = embedded_payload(wrb); - ep = phba->ep_array[ptcpcnct_out->cid]; + ep = phba->ep_array[ptcpcnct_out->cid - + phba->fw_config.iscsi_cid_start]; beiscsi_ep = ep->dd_data; beiscsi_ep->fw_handle = ptcpcnct_out->connection_handle; beiscsi_ep->cid_vld = 1; |