]> www.infradead.org Git - users/willy/xarray.git/commit
scsi: lpfc: Update PRLO handling in direct attached topology
authorJustin Tee <justin.tee@broadcom.com>
Fri, 26 Jul 2024 23:15:10 +0000 (16:15 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 3 Aug 2024 01:48:05 +0000 (21:48 -0400)
commit1f0f7679ad8942f810b0f19ee9cf098c3502d66a
tree9402d34c11c4430c1ed7a8295c964f38ee687b62
parentb5c18c9dd138733c16893613345af44deadcf05e
scsi: lpfc: Update PRLO handling in direct attached topology

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>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_nportdisc.c