aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-04-25 12:45:52 +0200
committerTejun Heo <tj@kernel.org>2016-05-09 12:36:46 -0400
commit28a3fc2295a744a0d2ddf86b2ccdf03fbab123f9 (patch)
tree37302dd2083fec2347b1805ebe8c57dbd82abb68 /include/linux/libata.h
parentlibata: fixup ZAC device disabling (diff)
downloadlinux-dev-28a3fc2295a744a0d2ddf86b2ccdf03fbab123f9.tar.xz
linux-dev-28a3fc2295a744a0d2ddf86b2ccdf03fbab123f9.zip
libata: implement ZBC IN translation
ZAC drives implement a 'ZAC Management In' command template, which maps onto the ZBC IN command. Signed-off-by: Hannes Reinecke <hare@suse.de> 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 92297cd111f6..c0806b60c4fa 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1651,6 +1651,13 @@ static inline bool ata_fpdma_read_log_supported(struct ata_device *dev)
ATA_LOG_NCQ_SEND_RECV_RD_LOG_SUPPORTED);
}
+static inline bool ata_fpdma_zac_mgmt_in_supported(struct ata_device *dev)
+{
+ return (dev->flags & ATA_DFLAG_NCQ_SEND_RECV) &&
+ (dev->ncq_send_recv_cmds[ATA_LOG_NCQ_SEND_RECV_ZAC_MGMT_OFFSET] &
+ ATA_LOG_NCQ_SEND_RECV_ZAC_MGMT_IN_SUPPORTED);
+}
+
static inline void ata_qc_set_polling(struct ata_queued_cmd *qc)
{
qc->tf.ctl |= ATA_NIEN;