linux/drivers/scsi/cxlflash
Uma Krishnan 96cf727fe8 scsi: cxlflash: Reset command ioasc
In the event of a command failure, cxlflash returns the failure to the upper
layers to process. After processing the error, when the command is queued
again, the private command structure will not be zeroed and the ioasc could be
stale. Per the SISLite specification, the AFU only sets the ioasc in the
presence of a failure. Thus, even though the original command succeeds the
second time, the command is considered a failure due to stale ioasc. This
cycle repeats indefinitely and can cause a hang or IO failure.

To fix the issue, clear the ioasc before queuing any command.

[mkp: added Cc: stable per request]

Fixes: 479ad8e9d4 ("scsi: cxlflash: Remove zeroing of private command data")
Cc: <stable@vger.kernel.org>
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>
2018-01-10 23:24:55 -05:00
..
common.h scsi: cxlflash: Remove zeroing of private command data 2017-06-26 15:01:13 -04:00
Kconfig scsi: cxlflash: Select IRQ_POLL 2017-05-08 22:09:21 -04:00
lunmgt.c scsi: cxlflash: Remove port configuration assumptions 2017-04-13 22:55:41 -04:00
main.c scsi: cxlflash: Reset command ioasc 2018-01-10 23:24:55 -05:00
main.h scsi: cxlflash: Allow cards without WWPN VPD to configure 2017-10-31 12:28:03 -04:00
Makefile cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
sislite.h scsi: cxlflash: Use derived maximum write same length 2017-10-31 12:28:02 -04:00
superpipe.c scsi: cxlflash: Derive pid through accessors 2017-10-31 12:28:04 -04:00
superpipe.h scsi: cxlflash: Fix warnings/errors 2017-04-13 22:55:41 -04:00
vlun.c scsi: cxlflash: Use derived maximum write same length 2017-10-31 12:28:02 -04:00
vlun.h scsi: cxlflash: Fix warnings/errors 2017-04-13 22:55:41 -04:00