linux-stable/drivers/scsi/cxlflash
Uma Krishnan 1dbdcf117b scsi: cxlflash: Reset command ioasc
commit 96cf727fe8 upstream.

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")
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-16 20:23:12 +01: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-02-16 20:23:12 +01:00
main.h scsi: cxlflash: Support AFU debug 2017-06-26 15:01:12 -04:00
Makefile cxlflash: Virtual LUN support 2015-08-26 18:05:39 -07:00
sislite.h scsi: cxlflash: Support WS16 unmap 2017-06-26 15:01:13 -04:00
superpipe.c scsi: cxlflash: Avoid double mutex unlock 2017-08-25 18:23:34 -04:00
superpipe.h scsi: cxlflash: Fix warnings/errors 2017-04-13 22:55:41 -04:00
vlun.c scsi: cxlflash: Fix vlun resize failure in the shrink path 2017-08-25 18:24:04 -04:00
vlun.h scsi: cxlflash: Fix warnings/errors 2017-04-13 22:55:41 -04:00