diff options
author | Hannes Reinecke <hare@suse.de> | 2015-03-27 16:46:30 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-03-27 11:59:21 -0400 |
commit | 9faa643855df6f673f08543576c759b82dd270d3 (patch) | |
tree | 39c8dade6f6d9b826d68fcc11b51f08c41583d9e /drivers/ata/libata-eh.c | |
parent | 3a02824396c1df1db422d067b0fdcac724f44dd6 (diff) | |
download | op-kernel-dev-9faa643855df6f673f08543576c759b82dd270d3.zip op-kernel-dev-9faa643855df6f673f08543576c759b82dd270d3.tar.gz |
libata: use READ_LOG_DMA_EXT
If READ_LOG_DMA_EXT is supported we should try to use it for
reading the log pages.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index d2029a4..d35d7a7 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1510,13 +1510,18 @@ unsigned int ata_read_log_page(struct ata_device *dev, u8 log, DPRINTK("read log page - log 0x%x, page 0x%x\n", log, page); ata_tf_init(dev, &tf); - tf.command = ATA_CMD_READ_LOG_EXT; + if (dev->dma_mode && ata_id_has_read_log_dma_ext(dev->id)) { + tf.command = ATA_CMD_READ_LOG_DMA_EXT; + tf.protocol = ATA_PROT_DMA; + } else { + tf.command = ATA_CMD_READ_LOG_EXT; + tf.protocol = ATA_PROT_PIO; + } tf.lbal = log; tf.lbam = page; tf.nsect = sectors; tf.hob_nsect = sectors >> 8; tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_LBA48 | ATA_TFLAG_DEVICE; - tf.protocol = ATA_PROT_PIO; err_mask = ata_exec_internal(dev, &tf, NULL, DMA_FROM_DEVICE, buf, sectors * ATA_SECT_SIZE, 0); |