• Christoph Hellwig's avatar
    [SCSI] libsas: fix sas_queuecommand return values · ac81c6a8
    Christoph Hellwig authored
    ->queuecommand must return either 0, or one of the SCSI_MLQUEUE_* return
    values.  Non-transient errors are indicated by setting cmd->result before
    calling ->scsi_done and returning 0.  Fix libsas to adhere to this calling
    convention.  Note that the DID_ERROR for returns from the low-level driver
    might not be correct for all cases, but it's the best we can do with
    the current layering in libsas.  I also suspect that the pre-existing
    handling of -SAS_QUEUE_FULL should really be SCSI_MLQUEUE_HOST_BUSY, but
    I'll leave that for a separate change.
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
    ac81c6a8
sas_scsi_host.c 28.4 KB