scsi: qla2xxx: Fix hang when issuing nvme disconnect-all in NPIV
authorArun Easi <aeasi@marvell.com>
Tue, 31 Mar 2020 10:40:14 +0000 (03:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 14:42:55 +0000 (16:42 +0200)
commit18859aa456e86b82c9fa68d6f2345ca7b833e8a4
treecbd83c0ff454ee18da28086a126746adad8cae66
parent6a42492da52d601f14fee8b8535ae236118bb609
scsi: qla2xxx: Fix hang when issuing nvme disconnect-all in NPIV

[ Upstream commit 45a76264c26fd8cfd0c9746196892d9b7e2657ee ]

In NPIV environment, a NPIV host may use a queue pair created by base host
or other NPIVs, so the check for a queue pair created by this NPIV is not
correct, and can cause an abort to fail, which in turn means the NVME
command not returned.  This leads to hang in nvme_fc layer in
nvme_fc_delete_association() which waits for all I/Os to be returned, which
is seen as hang in the application.

Link: https://lore.kernel.org/r/20200331104015.24868-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/qla2xxx/qla_mbx.c