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>
This commit is contained in:
parent
8a3e33cf92
commit
25c7ce7f7b
1 changed files with 5 additions and 14 deletions
|
@ -1774,21 +1774,12 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
|
||||||
* asc,ascq = ATA PASS-THROUGH INFORMATION AVAILABLE
|
* asc,ascq = ATA PASS-THROUGH INFORMATION AVAILABLE
|
||||||
*/
|
*/
|
||||||
if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) &&
|
if (((cdb[0] == ATA_16) || (cdb[0] == ATA_12)) &&
|
||||||
((cdb[2] & 0x20) || need_sense)) {
|
((cdb[2] & 0x20) || need_sense))
|
||||||
ata_gen_passthru_sense(qc);
|
ata_gen_passthru_sense(qc);
|
||||||
} else {
|
else if (need_sense)
|
||||||
if (!need_sense) {
|
ata_gen_ata_sense(qc);
|
||||||
cmd->result = SAM_STAT_GOOD;
|
else
|
||||||
} else {
|
cmd->result = SAM_STAT_GOOD;
|
||||||
/* 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (need_sense && !ap->ops->error_handler)
|
if (need_sense && !ap->ops->error_handler)
|
||||||
ata_dump_status(ap->print_id, &qc->result_tf);
|
ata_dump_status(ap->print_id, &qc->result_tf);
|
||||||
|
|
Loading…
Add table
Reference in a new issue