diff options
author | Marc Carino <marc.ceeeee@gmail.com> | 2013-08-25 02:22:51 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-08-25 09:39:12 -0400 |
commit | 87fb6c31b9ef9ccab9a822b01fc3911f026a29bb (patch) | |
tree | cde77c63326f50564a45afefeffd0003db8ee8c7 /include | |
parent | ed36911c747c18525691c0aa0fbe6b918c8eac19 (diff) |
libata: Add support for queued DSM TRIM
Some new SSDs support the queued version of the DSM TRIM command.
Let the driver use the new command if supported.
Signed-off-by: Marc Carino <marc.ceeeee@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/libata.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index a988c2d7d0e8..0e23c26485f4 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -1606,6 +1606,13 @@ static inline int ata_ncq_enabled(struct ata_device *dev) | |||
1606 | ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ; | 1606 | ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ; |
1607 | } | 1607 | } |
1608 | 1608 | ||
1609 | static inline bool ata_fpdma_dsm_supported(struct ata_device *dev) | ||
1610 | { | ||
1611 | return (dev->flags & ATA_DFLAG_NCQ_SEND_RECV) && | ||
1612 | (dev->ncq_send_recv_cmds[ATA_LOG_NCQ_SEND_RECV_DSM_OFFSET] & | ||
1613 | ATA_LOG_NCQ_SEND_RECV_DSM_TRIM); | ||
1614 | } | ||
1615 | |||
1609 | static inline void ata_qc_set_polling(struct ata_queued_cmd *qc) | 1616 | static inline void ata_qc_set_polling(struct ata_queued_cmd *qc) |
1610 | { | 1617 | { |
1611 | qc->tf.ctl |= ATA_NIEN; | 1618 | qc->tf.ctl |= ATA_NIEN; |