diff options
author | Hannes Reinecke <hare@suse.de> | 2015-03-27 18:46:37 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-03-27 18:59:22 +0300 |
commit | a1524f226a02aa6edebd90ae0752e97cfd78b159 (patch) | |
tree | 3b694223de3a939c51271f779966f1a11c74c74b /drivers/ata/libata-core.c | |
parent | fe7173c206de63fc28475ee6ae42ff95c05692de (diff) | |
download | linux-a1524f226a02aa6edebd90ae0752e97cfd78b159.tar.xz |
libata-eh: Set 'information' field for autosense
If NCQ autosense or the sense data reporting feature is enabled
the LBA of the offending command should be stored in the sense
data 'information' field.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index aebb7e305874..ff57367f5f0c 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -691,11 +691,11 @@ static int ata_rwcmd_protocol(struct ata_taskfile *tf, struct ata_device *dev) * RETURNS: * Block address read from @tf. */ -u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev) +u64 ata_tf_read_block(const struct ata_taskfile *tf, struct ata_device *dev) { u64 block = 0; - if (tf->flags & ATA_TFLAG_LBA) { + if (!dev || tf->flags & ATA_TFLAG_LBA) { if (tf->flags & ATA_TFLAG_LBA48) { block |= (u64)tf->hob_lbah << 40; block |= (u64)tf->hob_lbam << 32; |