Commit a35f87bd authored by Arun Easi's avatar Arun Easi Committed by Martin K. Petersen
Browse files

scsi: qla2xxx: Fix I/O errors during LIP reset tests

In .fcp_io(), returning ENODEV as soon as remote port delete has started
can cause I/O errors. Fix this by returning EBUSY until the remote port
delete finishes.

Link: https://lore.kernel.org/r/20200904045128.23631-9-njavali@marvell.com


Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarArun Easi <aeasi@marvell.com>
Signed-off-by: default avatarNilesh Javali <njavali@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 49db4d4e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -548,6 +548,14 @@ static int qla_nvme_post_cmd(struct nvme_fc_local_port *lport,
		return rval;

	vha = fcport->vha;

	if (!(fcport->nvme_flag & NVME_FLAG_REGISTERED))
		return rval;

	if (test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
	    (qpair && !qpair->fw_started) || fcport->deleted)
		return -EBUSY;

	/*
	 * If we know the dev is going away while the transport is still sending
	 * IO's return busy back to stall the IO Q.  This happens when the