linux/drivers/scsi/lpfc
Justin Tee 5e0e1a941e scsi: lpfc: Update PRLO handling in direct attached topology
[ Upstream commit 1f0f7679ad ]

A kref imbalance occurs when handling an unsolicited PRLO in direct
attached topology.

Rework PRLO rcv handling when in MAPPED state.  Save the state that we were
handling a PRLO by setting nlp_last_elscmd to ELS_CMD_PRLO.  Then in the
lpfc_cmpl_els_logo_acc() completion routine, manually restart discovery.
By issuing the PLOGI, which nlp_gets, before nlp_put at the end of the
lpfc_cmpl_els_logo_acc() routine, we are saving us from a final nlp_put.
And, we are still allowing the unreg_rpi to happen.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20240726231512.92867-7-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-10-10 11:57:37 +02:00
..
lpfc.h scsi: lpfc: Use a dedicated lock for ras_fwlog state 2024-05-17 12:02:09 +02:00
lpfc_attr.c scsi: lpfc: Fix a possible null pointer dereference 2024-08-03 08:53:59 +02:00
lpfc_attr.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_bsg.c scsi: lpfc: Fix overflow build issue 2024-09-30 16:25:08 +02:00
lpfc_bsg.h scsi: lpfc: Copyright updates for 14.2.0.5 patches 2022-07-07 17:21:44 -04:00
lpfc_compat.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_crtn.h scsi: lpfc: Replace blk_irq_poll intr handler with threaded IRQ 2023-05-08 07:16:05 -04:00
lpfc_ct.c scsi: lpfc: Make fabric zone discovery more robust when handling unsolicited LOGO 2023-07-23 16:17:07 -04:00
lpfc_debugfs.c scsi: lpfc: Use a dedicated lock for ras_fwlog state 2024-05-17 12:02:09 +02:00
lpfc_debugfs.h scsi: lpfc: Copyright updates for 14.2.0.6 patches 2022-08-31 23:39:58 -04:00
lpfc_disc.h scsi: lpfc: Fix multiple NVMe remoteport registration calls for the same NPort ID 2022-09-15 22:18:27 -04:00
lpfc_els.c scsi: lpfc: Update PRLO handling in direct attached topology 2024-10-10 11:57:37 +02:00
lpfc_hbadisc.c scsi: lpfc: Allow DEVICE_RECOVERY mode after RSCN receipt if in PRLI_ISSUE state 2024-08-03 08:54:26 +02:00
lpfc_hw.h scsi: lpfc: Set Establish Image Pair service parameter only for Target Functions 2023-07-23 16:17:07 -04:00
lpfc_hw4.h scsi: lpfc: Clean up SLI-4 CQE status handling 2023-05-31 18:14:20 -04:00
lpfc_ids.h scsi: lpfc: Copyright updates for 14.2.0.5 patches 2022-07-07 17:21:44 -04:00
lpfc_init.c scsi: lpfc: Use a dedicated lock for ras_fwlog state 2024-05-17 12:02:09 +02:00
lpfc_logmsg.h scsi: lpfc: Copyright updates for 14.2.0.13 patches 2023-05-31 18:14:20 -04:00
lpfc_mbox.c scsi: lpfc: Fix double word in comments 2023-02-21 22:00:51 -05:00
lpfc_mem.c scsi: lpfc: Copyright updates for 14.2.0.6 patches 2022-08-31 23:39:58 -04:00
lpfc_nl.h scsi: lpfc: Revise copyright for new company language 2018-07-10 22:15:09 -04:00
lpfc_nportdisc.c scsi: lpfc: Update PRLO handling in direct attached topology 2024-10-10 11:57:37 +02:00
lpfc_nvme.c scsi: lpfc: Replace hbalock with ndlp lock in lpfc_nvme_unregister_port() 2024-05-17 12:02:09 +02:00
lpfc_nvme.h scsi: lpfc: Copyright updates for 14.2.0.0 patches 2022-03-15 13:51:50 -04:00
lpfc_nvmet.c scsi: lpfc: Correct size for wqe for memset() 2024-04-03 15:29:03 +02:00
lpfc_scsi.c scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic 2024-05-17 12:02:09 +02:00
lpfc_scsi.h scsi: lpfc: Copyright updates for 14.2.0.6 patches 2022-08-31 23:39:58 -04:00
lpfc_sli.c scsi: lpfc: Initialize status local variable in lpfc_sli4_repost_sgl_list() 2024-08-29 17:33:34 +02:00
lpfc_sli.h scsi: lpfc: Remove Menlo/Hornet related code 2022-07-07 17:21:44 -04:00
lpfc_sli4.h scsi: lpfc: Replace blk_irq_poll intr handler with threaded IRQ 2023-05-08 07:16:05 -04:00
lpfc_version.h scsi: lpfc: Update lpfc version to 14.2.0.14 2023-07-23 16:17:08 -04:00
lpfc_vmid.c scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes 2024-02-05 20:14:23 +00:00
lpfc_vport.c scsi: lpfc: Move NPIV's transport unregistration to after resource clean up 2024-05-17 12:02:09 +02:00
lpfc_vport.h scsi: lpfc: Copyright updates for 14.2.0.6 patches 2022-08-31 23:39:58 -04:00
Makefile scsi: lpfc: Commonize VMID code location 2022-05-19 20:24:56 -04:00