diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 16 |
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) { |