mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
scsi: lpfc: Add log messages to fabric login error labels
Should fabric login or related initialization mailbox commands fail, there are no log messages to notify which step encountered an issue. Update error label paths to log when unexpected fabric login issues occur. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://patch.msgid.link/20260212213008.149873-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
b4082ac8e6
commit
5f442e54e9
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2026 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -1303,8 +1303,12 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
elsiocb = lpfc_prep_els_iocb(vport, 1, cmdsize, retry, ndlp,
|
||||
ndlp->nlp_DID, ELS_CMD_FLOGI);
|
||||
|
||||
if (!elsiocb)
|
||||
if (!elsiocb) {
|
||||
lpfc_vport_set_state(vport, FC_VPORT_FAILED);
|
||||
lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS | LOG_DISCOVERY,
|
||||
"4296 Unable to prepare FLOGI iocb\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
wqe = &elsiocb->wqe;
|
||||
pcmd = (uint8_t *)elsiocb->cmd_dmabuf->virt;
|
||||
|
|
@ -1394,10 +1398,8 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
phba->sli3_options, 0, 0);
|
||||
|
||||
elsiocb->ndlp = lpfc_nlp_get(ndlp);
|
||||
if (!elsiocb->ndlp) {
|
||||
lpfc_els_free_iocb(phba, elsiocb);
|
||||
return 1;
|
||||
}
|
||||
if (!elsiocb->ndlp)
|
||||
goto err_out;
|
||||
|
||||
/* Avoid race with FLOGI completion and hba_flags. */
|
||||
set_bit(HBA_FLOGI_ISSUED, &phba->hba_flag);
|
||||
|
|
@ -1407,9 +1409,8 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
if (rc == IOCB_ERROR) {
|
||||
clear_bit(HBA_FLOGI_ISSUED, &phba->hba_flag);
|
||||
clear_bit(HBA_FLOGI_OUTSTANDING, &phba->hba_flag);
|
||||
lpfc_els_free_iocb(phba, elsiocb);
|
||||
lpfc_nlp_put(ndlp);
|
||||
return 1;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
/* Clear external loopback plug detected flag */
|
||||
|
|
@ -1474,6 +1475,13 @@ lpfc_issue_els_flogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_out:
|
||||
lpfc_els_free_iocb(phba, elsiocb);
|
||||
lpfc_vport_set_state(vport, FC_VPORT_FAILED);
|
||||
lpfc_printf_vlog(vport, KERN_WARNING, LOG_ELS | LOG_DISCOVERY,
|
||||
"4297 Issue FLOGI: Cannot send IOCB\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3174,7 +3174,11 @@ lpfc_init_vfi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
|
|||
return;
|
||||
}
|
||||
|
||||
lpfc_initial_flogi(vport);
|
||||
if (!lpfc_initial_flogi(vport)) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX | LOG_ELS,
|
||||
"2345 Can't issue initial FLOGI\n");
|
||||
lpfc_vport_set_state(vport, FC_VPORT_FAILED);
|
||||
}
|
||||
mempool_free(mboxq, phba->mbox_mem_pool);
|
||||
return;
|
||||
}
|
||||
|
|
@ -3247,8 +3251,14 @@ lpfc_init_vpi_cmpl(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
|
|||
return;
|
||||
}
|
||||
|
||||
if (phba->link_flag & LS_NPIV_FAB_SUPPORTED)
|
||||
lpfc_initial_fdisc(vport);
|
||||
if (phba->link_flag & LS_NPIV_FAB_SUPPORTED) {
|
||||
if (!lpfc_initial_fdisc(vport)) {
|
||||
lpfc_printf_vlog(vport, KERN_WARNING,
|
||||
LOG_MBOX | LOG_ELS,
|
||||
"2346 Can't issue initial FDISC\n");
|
||||
lpfc_vport_set_state(vport, FC_VPORT_FAILED);
|
||||
}
|
||||
}
|
||||
else {
|
||||
lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP);
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user