• Matthew R. Ochs's avatar
    scsi: cxlflash: Remove AFU command lock · 9ba848ac
    Matthew R. Ochs authored
    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: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
    Acked-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    9ba848ac
main.c 68.3 KB