diff options
author | Christoph Hellwig <hch@lst.de> | 2015-10-03 19:21:11 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-10-04 13:37:58 -0400 |
commit | 25c7ce7f7b511fc02b6eef95595af2cea80e2612 (patch) | |
tree | 3bb2123b0b0f096f14424fe83b588beb76f7ccbd /drivers/ata | |
parent | 8a3e33cf92c7b7ae25c589eccd1a69ab11cc4353 (diff) | |
download | linux-25c7ce7f7b511fc02b6eef95595af2cea80e2612.tar.bz2 |
libata: cleanup ata_scsi_qc_complete
Remove an incorrect comment and untangle an if statement in
ata_scsi_qc_complete.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-scsi.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 183a57bff935..ebcba8504ac0 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -1774,21 +1774,12 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) * asc,ascq = ATA PASS-THROUGH INFORMATION AVAILABLE */ if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) && - ((cdb[2] & 0x20) || need_sense)) { + ((cdb[2] & 0x20) || need_sense)) ata_gen_passthru_sense(qc); - } else { - if (!need_sense) { - cmd->result = SAM_STAT_GOOD; - } else { - /* TODO: decide which descriptor format to use - * for 48b LBA devices and call that here - * instead of the fixed desc, which is only - * good for smaller LBA (and maybe CHS?) - * devices. - */ - ata_gen_ata_sense(qc); - } - } + else if (need_sense) + ata_gen_ata_sense(qc); + else + cmd->result = SAM_STAT_GOOD; if (need_sense && !ap->ops->error_handler) ata_dump_status(ap->print_id, &qc->result_tf); |