1. 01 Jul, 2017 2 commits
  2. 28 Jun, 2017 35 commits
  3. 26 Jun, 2017 3 commits
    • Matthew R. Ochs's avatar
      scsi: cxlflash: Update TMF command processing · 8ba1ddb3
      Matthew R. Ochs authored
      Currently, the SCSI command presented to the device reset handler is used
      to send TMFs to the AFU for a device reset. This behavior is incorrect as
      the command presented is an actual command and not a special notification.
      As such, it should only be used for reference and not be acted upon.
      
      Additionally, the existing TMF transmission routine does not account for
      actual errors from the hardware, only reflecting failure when a timeout
      occurs. This can lead to a condition where the device reset handler is
      presented with a false 'success'.
      
      Update send_tmf() to dynamically allocate a private command for sending
      the TMF command and properly reflect failure when the completed command
      indicates an error or was aborted. Detect TMF commands during response
      processing and avoid scsi_done() for these types of commands. Lastly,
      update comments in the TMF processing paths to describe the new behavior.
      Signed-off-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Signed-off-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8ba1ddb3
    • Matthew R. Ochs's avatar
      scsi: cxlflash: Remove zeroing of private command data · 479ad8e9
      Matthew R. Ochs authored
      The SCSI core now zeroes the per-command private data area prior to
      calling into the LLD. Replace the clearing operation that takes place
      when the private command data reference is obtained with a routine that
      performs common initializations. The zeroing that takes place in the
      device reset path remains intact as the private command data associated
      with the specified SCSI command is not guaranteed to be cleared.
      Signed-off-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Signed-off-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      479ad8e9
    • Matthew R. Ochs's avatar
      scsi: cxlflash: Support WS16 unmap · 3223c01a
      Matthew R. Ochs authored
      The cxlflash driver supports performing a write-same16 to scrub virtual
      luns when they are released by a user. To date, AFUs for adapters that
      are supported by cxlflash do not have the capability to unmap as part of
      the WS operation. This can lead to fragmented flash devices which results
      in performance degradation.
      
      Future AFUs can optionally support unmap write-same commands and reflects
      this support via the context control register. This provides userspace
      applications with direct visibility such that they need not depend on a
      host API.
      
      Detect unmap support during cxlflash initialization by reading the context
      control register associated with the primary hardware queue. Update the
      existing write_same16() routine to set the unmap bit in the CDB when unmap
      is supported by the host.
      Signed-off-by: default avatarMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
      Signed-off-by: default avatarUma Krishnan <ukrishn@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      3223c01a