scsi: qla2xxx: Fix command flush during TMF
authorQuinn Tran <qutran@marvell.com>
Fri, 14 Jul 2023 07:00:58 +0000 (12:30 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 23 Jul 2023 20:27:47 +0000 (16:27 -0400)
commitda7c21b72aa86e990af5f73bce6590b8d8d148d0
tree04f0fe21bfadb7a21b69511c060b121ba629785c
parenta8ec192427e0516436e61f9ca9eb49c54eadfe0a
scsi: qla2xxx: Fix command flush during TMF

For each TMF request, driver iterates through each qpair and flushes
commands associated to the TMF. At the end of the qpair flush, a Marker is
used to complete the flush transaction. This process was repeated for each
qpair. The multiple flush and marker for this TMF request seems to cause
confusion for FW.

Instead, 1 flush is sent to FW. Driver would wait for FW to go through all
the I/Os on each qpair to be read then return. Driver then closes out the
transaction with a Marker.

Cc: stable@vger.kernel.org
Fixes: d90171dd0da5 ("scsi: qla2xxx: Multi-que support for TMF")
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230714070104.40052-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_iocb.c
drivers/scsi/qla2xxx/qla_os.c