Commit 5c65d8bb authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Tejun Heo

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: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 5a233551
...@@ -306,6 +306,9 @@ enum { ...@@ -306,6 +306,9 @@ enum {
/* marked obsolete in the ATA/ATAPI-7 spec */ /* marked obsolete in the ATA/ATAPI-7 spec */
ATA_CMD_RESTORE = 0x10, ATA_CMD_RESTORE = 0x10,
/* Subcmds for ATA_CMD_FPDMA_RECV */
ATA_SUBCMD_FPDMA_RECV_RD_LOG_DMA_EXT = 0x01,
/* Subcmds for ATA_CMD_FPDMA_SEND */ /* Subcmds for ATA_CMD_FPDMA_SEND */
ATA_SUBCMD_FPDMA_SEND_DSM = 0x00, ATA_SUBCMD_FPDMA_SEND_DSM = 0x00,
ATA_SUBCMD_FPDMA_SEND_WR_LOG_DMA_EXT = 0x02, ATA_SUBCMD_FPDMA_SEND_WR_LOG_DMA_EXT = 0x02,
...@@ -329,7 +332,9 @@ enum { ...@@ -329,7 +332,9 @@ enum {
ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET = 0x04, ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET = 0x04,
ATA_LOG_NCQ_SEND_RECV_DSM_TRIM = (1 << 0), ATA_LOG_NCQ_SEND_RECV_DSM_TRIM = (1 << 0),
ATA_LOG_NCQ_SEND_RECV_RD_LOG_OFFSET = 0x08, ATA_LOG_NCQ_SEND_RECV_RD_LOG_OFFSET = 0x08,
ATA_LOG_NCQ_SEND_RECV_RD_LOG_SUPPORTED = (1 << 0),
ATA_LOG_NCQ_SEND_RECV_WR_LOG_OFFSET = 0x0C, ATA_LOG_NCQ_SEND_RECV_WR_LOG_OFFSET = 0x0C,
ATA_LOG_NCQ_SEND_RECV_WR_LOG_SUPPORTED = (1 << 0),
ATA_LOG_NCQ_SEND_RECV_SIZE = 0x10, ATA_LOG_NCQ_SEND_RECV_SIZE = 0x10,
/* READ/WRITE LONG (obsolete) */ /* READ/WRITE LONG (obsolete) */
......
...@@ -1642,6 +1642,13 @@ static inline bool ata_fpdma_dsm_supported(struct ata_device *dev) ...@@ -1642,6 +1642,13 @@ static inline bool ata_fpdma_dsm_supported(struct ata_device *dev)
ATA_LOG_NCQ_SEND_RECV_DSM_TRIM); 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) static inline void ata_qc_set_polling(struct ata_queued_cmd *qc)
{ {
qc->tf.ctl |= ATA_NIEN; qc->tf.ctl |= ATA_NIEN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment