scsi: lpfc: Fix pt2pt state transition causing rmmod hang
authorJames Smart <jsmart2021@gmail.com>
Mon, 1 Mar 2021 17:18:15 +0000 (09:18 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Mar 2021 22:37:05 +0000 (17:37 -0500)
commitdebbc1e2b978bbacd629e30d93d8eaba1592c358
treee4b5327029861a019d239bfb93ef1f451284a24c
parentbb6fd33e3a0cf4325a8114f2f2fece881713973c
scsi: lpfc: Fix pt2pt state transition causing rmmod hang

On a setup with a dual port HBA and both ports direct connected, an rmmod
hangs momentarily when we log an Illegal State Transition. Once it resumes,
a nodelist not empty logic is hit, which forces rmmod to cleanup and exit.
We're missing a state transition case in the discovery engine.

Fix by adding a case for a DEVICE_RM event while in the unmapped state to
avoid illegal state transition log message.

Link: https://lore.kernel.org/r/20210301171821.3427-17-jsmart2021@gmail.com
Co-developed-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nportdisc.c