]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: cxlflash: Reset command ioasc
authorUma Krishnan <ukrishn@linux.vnet.ibm.com>
Wed, 3 Jan 2018 22:54:02 +0000 (16:54 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 22 Feb 2018 14:21:55 +0000 (08:21 -0600)
commitac713cf4138eb3f7aec6dcc7bf8197bd00c3c33e
tree6fe2e6814bcccc67179ac8b419420e5886824006
parent9f7dc92e857359614646afbd4384e637bd4026bf
scsi: cxlflash: Reset command ioasc

BugLink: http://bugs.launchpad.net/bugs/1751064
commit 96cf727fe8f102bf92150b741db71ee39fb8c521 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: 479ad8e9d48c ("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>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/cxlflash/main.c