diff options
author | Hannes Reinecke <hare@suse.de> | 2016-04-04 11:43:58 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2016-04-04 12:07:40 -0400 |
commit | cf8b49b0af39b8e8fa358623acda57f01251b6d4 (patch) | |
tree | 91314f4368bfc89a161f2f058cc987699e2efbe5 /drivers/ata | |
parent | cffd1ee991c566bca937392cfacdafbe3b7b58c6 (diff) | |
download | linux-cf8b49b0af39b8e8fa358623acda57f01251b6d4.tar.bz2 |
libata-scsi: use scsi_set_sense_information()
Use scsi_set_sense_information() instead of hand-crafted function.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-scsi.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index fc23d3f4282d..47b103d9baac 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -1055,7 +1055,6 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc) struct scsi_cmnd *cmd = qc->scsicmd; struct ata_taskfile *tf = &qc->result_tf; unsigned char *sb = cmd->sense_buffer; - unsigned char *desc = sb + 8; int verbose = qc->ap->ops->error_handler == NULL; u64 block; @@ -1086,18 +1085,7 @@ static void ata_gen_ata_sense(struct ata_queued_cmd *qc) if (block == U64_MAX) return; - /* information sense data descriptor */ - sb[7] = 12; - desc[0] = 0x00; - desc[1] = 10; - - desc[2] |= 0x80; /* valid */ - desc[6] = block >> 40; - desc[7] = block >> 32; - desc[8] = block >> 24; - desc[9] = block >> 16; - desc[10] = block >> 8; - desc[11] = block; + scsi_set_sense_information(sb, SCSI_SENSE_BUFFERSIZE, block); } static void ata_scsi_sdev_config(struct scsi_device *sdev) |