aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorSeokmann Ju <seokmann.ju@qlogic.com>2007-09-20 17:07:43 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:50:14 -0400
commit4d0ea24769c81581b8fd25fd7deff281b1b97dee (patch)
tree13b37f29f2d8063db4639940177800fd848980a0 /drivers/scsi/qla2xxx/qla_init.c
parentc45bcc8e771fa152ed540b8cb2ac8022280173bd (diff)
[SCSI] qla2xxx: Retrieve max-NPIV support capabilities from FW.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 083997c3066e..e449f4807bb1 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -849,7 +849,8 @@ qla2x00_resize_request_q(scsi_qla_host_t *ha)
849 return; 849 return;
850 850
851 /* Retrieve IOCB counts available to the firmware. */ 851 /* Retrieve IOCB counts available to the firmware. */
852 rval = qla2x00_get_resource_cnts(ha, NULL, NULL, NULL, &fw_iocb_cnt); 852 rval = qla2x00_get_resource_cnts(ha, NULL, NULL, NULL, &fw_iocb_cnt,
853 &ha->max_npiv_vports);
853 if (rval) 854 if (rval)
854 return; 855 return;
855 /* No point in continuing if current settings are sufficient. */ 856 /* No point in continuing if current settings are sufficient. */
@@ -916,9 +917,15 @@ qla2x00_setup_chip(scsi_qla_host_t *ha)
916 &ha->fw_attributes, &ha->fw_memory_size); 917 &ha->fw_attributes, &ha->fw_memory_size);
917 qla2x00_resize_request_q(ha); 918 qla2x00_resize_request_q(ha);
918 ha->flags.npiv_supported = 0; 919 ha->flags.npiv_supported = 0;
919 if (IS_QLA24XX(ha) && 920 if ((IS_QLA24XX(ha) || IS_QLA25XX(ha)) &&
920 (ha->fw_attributes & BIT_2)) 921 (ha->fw_attributes & BIT_2)) {
921 ha->flags.npiv_supported = 1; 922 ha->flags.npiv_supported = 1;
923 if ((!ha->max_npiv_vports) ||
924 ((ha->max_npiv_vports + 1) %
925 MAX_MULTI_ID_FABRIC))
926 ha->max_npiv_vports =
927 MAX_NUM_VPORT_FABRIC;
928 }
922 929
923 if (ql2xallocfwdump) 930 if (ql2xallocfwdump)
924 qla2x00_alloc_fw_dump(ha); 931 qla2x00_alloc_fw_dump(ha);
@@ -1155,8 +1162,7 @@ qla2x00_init_rings(scsi_qla_host_t *ha)
1155 1162
1156 DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no)); 1163 DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no));
1157 1164
1158 mid_init_cb->count = MAX_NUM_VPORT_FABRIC; 1165 mid_init_cb->count = ha->max_npiv_vports;
1159 ha->max_npiv_vports = MAX_NUM_VPORT_FABRIC;
1160 1166
1161 rval = qla2x00_init_firmware(ha, ha->init_cb_size); 1167 rval = qla2x00_init_firmware(ha, ha->init_cb_size);
1162 if (rval) { 1168 if (rval) {