summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Tee <justin.tee@broadcom.com>2025-06-18 12:21:31 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2025-06-23 13:10:33 -0400
commit5a00dfc58bfe5fcff079bf90d1cc0254cab8e33e (patch)
treeff29f3d984466f1448c32d3e5f88f0293811d574
parent6b61ec3dd472f8fd367f116e61771030f4d410db (diff)
scsi: lpfc: Simplify error handling for failed lpfc_get_sli4_parameters cmd
There are unnecessary checks on an HBA's interface type and family before erroring out a failed lpfc_get_sli4_parameters mailbox command. Simplify the error handling by logging a message and proceeding to memory free labels. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20250618192138.124116-7-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 20fa450def03..7695a815de7a 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -7919,8 +7919,6 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
int longs;
int extra;
uint64_t wwn;
- u32 if_type;
- u32 if_fam;
phba->sli4_hba.num_present_cpu = lpfc_present_cpu;
phba->sli4_hba.num_possible_cpu = cpumask_last(cpu_possible_mask) + 1;
@@ -8180,28 +8178,11 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)
*/
rc = lpfc_get_sli4_parameters(phba, mboxq);
if (rc) {
- if_type = bf_get(lpfc_sli_intf_if_type,
- &phba->sli4_hba.sli_intf);
- if_fam = bf_get(lpfc_sli_intf_sli_family,
- &phba->sli4_hba.sli_intf);
- if (phba->sli4_hba.extents_in_use &&
- phba->sli4_hba.rpi_hdrs_in_use) {
- lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
- "2999 Unsupported SLI4 Parameters "
- "Extents and RPI headers enabled.\n");
- if (if_type == LPFC_SLI_INTF_IF_TYPE_0 &&
- if_fam == LPFC_SLI_INTF_FAMILY_BE2) {
- mempool_free(mboxq, phba->mbox_mem_pool);
- rc = -EIO;
- goto out_free_bsmbx;
- }
- }
- if (!(if_type == LPFC_SLI_INTF_IF_TYPE_0 &&
- if_fam == LPFC_SLI_INTF_FAMILY_BE2)) {
- mempool_free(mboxq, phba->mbox_mem_pool);
- rc = -EIO;
- goto out_free_bsmbx;
- }
+ lpfc_log_msg(phba, KERN_WARNING, LOG_INIT,
+ "2999 Could not get SLI4 parameters\n");
+ rc = -EIO;
+ mempool_free(mboxq, phba->mbox_mem_pool);
+ goto out_free_bsmbx;
}
/*