summaryrefslogtreecommitdiff
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-04-25 13:45:54 +0300
committerTejun Heo <tj@kernel.org>2016-05-09 19:36:46 +0300
commit284b3b77ea883234dadb2cbf97b145c3c30fe4bd (patch)
tree2faa832ef21a350e2d6b5e4c238f70e38e0e6502 /include/linux/libata.h
parent27708a9579ee069c6e0ebb6e61ac1114ed1d546c (diff)
downloadlinux-284b3b77ea883234dadb2cbf97b145c3c30fe4bd.tar.xz
libata: NCQ encapsulation for ZAC MANAGEMENT OUT
Add NCQ encapsulation for ZAC MANAGEMENT OUT and evaluate NCQ Non-Data log pages to figure out if NCQ encapsulation is supported. 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 c0806b60c4fa..0019d4b51b11 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -729,6 +729,7 @@ struct ata_device {
/* NCQ send and receive log subcommand support */
u8 ncq_send_recv_cmds[ATA_LOG_NCQ_SEND_RECV_SIZE];
+ u8 ncq_non_data_cmds[ATA_LOG_NCQ_NON_DATA_SIZE];
/* error history */
int spdn_cnt;
@@ -1658,6 +1659,12 @@ static inline bool ata_fpdma_zac_mgmt_in_supported(struct ata_device *dev)
ATA_LOG_NCQ_SEND_RECV_ZAC_MGMT_IN_SUPPORTED);
}
+static inline bool ata_fpdma_zac_mgmt_out_supported(struct ata_device *dev)
+{
+ return (dev->ncq_non_data_cmds[ATA_LOG_NCQ_NON_DATA_ZAC_MGMT_OFFSET] &
+ ATA_LOG_NCQ_NON_DATA_ZAC_MGMT_OUT);
+}
+
static inline void ata_qc_set_polling(struct ata_queued_cmd *qc)
{
qc->tf.ctl |= ATA_NIEN;