diff mbox series

[2/8] lpfc: Notify fc transport of rport disappearance during PCI fcn reset

Message ID 20250425194806.3585-3-justintee8345@gmail.com
State New
Headers show
Series Update lpfc to revision 14.4.0.9 | expand

Commit Message

Justin Tee April 25, 2025, 7:48 p.m. UTC
A PCI function reset implies a temporary disappearance of a fc_rport.  So,
call lpfc_scsi_dev_block, which sets all mapped fc_rports into the
temporary FC_PORTSTATE_BLOCKED state.  Once PCI function reset completes
and link reinitialized, the fc_rport is rediscovered and
FC_PORTSTATE_BLOCKED state is removed.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
---
 drivers/scsi/lpfc/lpfc_init.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 90021653e59e..2400602a8561 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1907,6 +1907,9 @@  lpfc_sli4_port_sta_fn_reset(struct lpfc_hba *phba, int mbx_action,
 	uint32_t intr_mode;
 	LPFC_MBOXQ_t *mboxq;
 
+	/* Notifying the transport that the targets are going offline. */
+	lpfc_scsi_dev_block(phba);
+
 	if (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) >=
 	    LPFC_SLI_INTF_IF_TYPE_2) {
 		/*