aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 48a5f067cec6..7ae343b14630 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -5850,6 +5850,8 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
5850 int fof_vectors = 0; 5850 int fof_vectors = 0;
5851 int extra; 5851 int extra;
5852 uint64_t wwn; 5852 uint64_t wwn;
5853 u32 if_type;
5854 u32 if_fam;
5853 5855
5854 phba->sli4_hba.num_online_cpu = num_online_cpus(); 5856 phba->sli4_hba.num_online_cpu = num_online_cpus();
5855 phba->sli4_hba.num_present_cpu = lpfc_present_cpu; 5857 phba->sli4_hba.num_present_cpu = lpfc_present_cpu;
@@ -6171,15 +6173,28 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
6171 */ 6173 */
6172 rc = lpfc_get_sli4_parameters(phba, mboxq); 6174 rc = lpfc_get_sli4_parameters(phba, mboxq);
6173 if (rc) { 6175 if (rc) {
6176 if_type = bf_get(lpfc_sli_intf_if_type,
6177 &phba->sli4_hba.sli_intf);
6178 if_fam = bf_get(lpfc_sli_intf_sli_family,
6179 &phba->sli4_hba.sli_intf);
6174 if (phba->sli4_hba.extents_in_use && 6180 if (phba->sli4_hba.extents_in_use &&
6175 phba->sli4_hba.rpi_hdrs_in_use) { 6181 phba->sli4_hba.rpi_hdrs_in_use) {
6176 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 6182 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
6177 "2999 Unsupported SLI4 Parameters " 6183 "2999 Unsupported SLI4 Parameters "
6178 "Extents and RPI headers enabled.\n"); 6184 "Extents and RPI headers enabled.\n");
6185 if (if_type == LPFC_SLI_INTF_IF_TYPE_0 &&
6186 if_fam == LPFC_SLI_INTF_FAMILY_BE2) {
6187 mempool_free(mboxq, phba->mbox_mem_pool);
6188 rc = -EIO;
6189 goto out_free_bsmbx;
6190 }
6191 }
6192 if (!(if_type == LPFC_SLI_INTF_IF_TYPE_0 &&
6193 if_fam == LPFC_SLI_INTF_FAMILY_BE2)) {
6194 mempool_free(mboxq, phba->mbox_mem_pool);
6195 rc = -EIO;
6196 goto out_free_bsmbx;
6179 } 6197 }
6180 mempool_free(mboxq, phba->mbox_mem_pool);
6181 rc = -EIO;
6182 goto out_free_bsmbx;
6183 } 6198 }
6184 6199
6185 mempool_free(mboxq, phba->mbox_mem_pool); 6200 mempool_free(mboxq, phba->mbox_mem_pool);