]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
scsi: cxlflash: Remove AFU command lock
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Tue, 29 Nov 2016 00:42:42 +0000 (18:42 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 1 Dec 2016 00:53:02 +0000 (19:53 -0500)
commit9ba848acbf4fbc6d99a0992df9ef5eb1b4842ba9
treeeef7ea2a2a7b6fd7cfe0ebe623a2a6bf17f31755
parentde01283baa334b1d938cfd9121198c517ad6dc89
scsi: cxlflash: Remove AFU command lock

The original design of the cxlflash driver required AFU commands
to convey state information across multiple threads. The IOASA
"host use" byte was used to track if a command was done, errored,
or timed out. A per-command spin lock was used to serialize access
to this byte. As this is no longer required with the introduction
of completions and various refactoring over time, the spin lock,
state tracking, and associated code can be removed. To support the
simplification, the wait_resp() routine is refactored to return a
success or failure. Additionally, as the simplification to the
AFU internal command routine, explicit assignments of AFU command
fields to zero are removed as the memory is zeroed upon allocation.

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