scsi: lpfc: Fix hdwq sgl locks and irq handling
authorJames Smart <jsmart2021@gmail.com>
Sun, 22 Sep 2019 03:59:01 +0000 (20:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:22:59 +0000 (08:22 +0100)
commit51a2104cc423abdc7e897d7e58d7a11bc17ff7b3
treea544500ac5c10a9d58be3ffe513527b7fb567f26
parent287a465e1204f5d2ae26dbb9c9a215e441d832fb
scsi: lpfc: Fix hdwq sgl locks and irq handling

commit a4c21acca2be6729ecbe72eda9b08092725b0a77 upstream.

Many of the sgl-per-hdwq paths are locking with spin_lock_irq() and
spin_unlock_irq() and may unwittingly raising irq when it shouldn't. Hard
deadlocks were seen around lpfc_scsi_prep_cmnd().

Fix by converting the locks to irqsave/irqrestore.

Fixes: d79c9e9d4b3d ("scsi: lpfc: Support dynamic unbounded SGL lists on G7 hardware.")
Link: https://lore.kernel.org/r/20190922035906.10977-16-jsmart2021@gmail.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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/lpfc/lpfc_sli.c