scsi: qedf: Modify flush routine to handle all I/Os and TMF
authorShyam Sundar <ssundar@marvell.com>
Tue, 26 Mar 2019 07:38:37 +0000 (00:38 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 28 Mar 2019 01:54:52 +0000 (21:54 -0400)
commit5d5e55659b375a39a42dad988869cd9966d20255
tree6dc31ba4cf3fa527ece3565294fa5d8b286cbd87
parent3e2c11b3fb7a237683f9405f14482a6f089b7e37
scsi: qedf: Modify flush routine to handle all I/Os and TMF

The purpose of flush routine is to cleanup I/Os to the firmware and
complete them to scsi middle layer. This routine is invoked before
connection is uploaded because of rport going away.

 - Don't process any I/Os, aborts, TMFs coming when flush in progress.

 - Add flags to handle cleanup and release of I/Os because flush can
   prematurely complete I/Os.

 - Original command can get completed to driver when cleanup for same is
   posted to firmware, handle this condition.

 - Modify flush to handle I/Os in all the states like abort, TMF, RRQ and
   timeouts.

Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf.h
drivers/scsi/qedf/qedf_els.c
drivers/scsi/qedf/qedf_io.c
drivers/scsi/qedf/qedf_main.c