scsi: cxlflash: Flush pending commands in cleanup path
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>
Thu, 22 Jun 2017 02:14:56 +0000 (21:14 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 26 Jun 2017 19:01:09 +0000 (15:01 -0400)
commita1ea04b3ebd9ae5c1cd5bf48be37aba0d93c1acc
tree39287f6bd6f90ac40ea84d4163fc2c25c9c960e8
parenta002bf830f5df3e622e32fdbde1756bcbb6aedad
scsi: cxlflash: Flush pending commands in cleanup path

When the AFU is reset in an error path, pending scsi commands can be
silently dropped without completion or a formal abort. This puts the onus
on the cxlflash driver to notify mid-layer and indicating that the command
can be retried.

Once the card has been quiesced, the hardware send queue lock is acquired
to prevent any data movement while the pending commands are processed.

Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/common.h
drivers/scsi/cxlflash/main.c