diff mbox series

[1/3] ata: libata: Introduce ata_qc_has_cdl()

Message ID 20230817214137.462044-1-ipylypiv@google.com
State New
Headers show
Series [1/3] ata: libata: Introduce ata_qc_has_cdl() | expand

Commit Message

Igor Pylypiv Aug. 17, 2023, 9:41 p.m. UTC
Introduce the inline helper function ata_qc_has_cdl() to test if
a queued command has a Command Duration Limits descriptor set.

Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
---
 include/linux/libata.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/libata.h b/include/linux/libata.h
index 820f7a3a2749..bc7870f1f527 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1062,6 +1062,11 @@  static inline bool ata_port_is_frozen(const struct ata_port *ap)
 	return ap->pflags & ATA_PFLAG_FROZEN;
 }
 
+static inline bool ata_qc_has_cdl(struct ata_queued_cmd *qc)
+{
+	return qc->flags & ATA_QCFLAG_HAS_CDL;
+}
+
 extern int ata_std_prereset(struct ata_link *link, unsigned long deadline);
 extern int ata_wait_after_reset(struct ata_link *link, unsigned long deadline,
 				int (*check_ready)(struct ata_link *link));