diff options
author | Jayamohan Kallickal <jayamohank@serverengines.com> | 2010-01-04 18:34:12 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-01-18 11:48:17 -0500 |
commit | 7da5087971b1a187f92be4efb74a991ac9ccb0a3 (patch) | |
tree | 98daec2de829bc1c1c4f549e07c426a86f22b034 /drivers/scsi/be2iscsi/be_mgmt.c | |
parent | 1fe6dbf4d0afba52ad0249f398e6296a1433a004 (diff) |
[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 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; |