aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-04-25 12:45:47 +0200
committerTejun Heo <tj@kernel.org>2016-05-09 12:36:45 -0400
commit5c65d8bb3503beb12864895426a69269c19e6e87 (patch)
treec0448bbdf8b482e74dd4e3695851b7eed9c6e650 /include/linux/libata.h
parentlibata: Separate out ata_dev_config_ncq_send_recv() (diff)
downloadlinux-dev-5c65d8bb3503beb12864895426a69269c19e6e87.tar.xz
linux-dev-5c65d8bb3503beb12864895426a69269c19e6e87.zip
libata: Add command definitions for NCQ Encapsulation for READ LOG DMA EXT
ACS-4 defines an NCQ encapsulation for READ LOG DMA EXT. Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index a418bca0df0d..09ddb5a6f555 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1642,6 +1642,13 @@ static inline bool ata_fpdma_dsm_supported(struct ata_device *dev)
ATA_LOG_NCQ_SEND_RECV_DSM_TRIM);
}
+static inline bool ata_fpdma_read_log_supported(struct ata_device *dev)
+{
+ return (dev->flags & ATA_DFLAG_NCQ_SEND_RECV) &&
+ (dev->ncq_send_recv_cmds[ATA_LOG_NCQ_SEND_RECV_RD_LOG_OFFSET] &
+ ATA_LOG_NCQ_SEND_RECV_RD_LOG_SUPPORTED);
+}
+
static inline void ata_qc_set_polling(struct ata_queued_cmd *qc)
{
qc->tf.ctl |= ATA_NIEN;