aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-02-20 09:20:27 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-21 04:58:18 -0500
commit6d1245bf294e9ea65b3717be9fa0338bfb6ff6c9 (patch)
tree85efbfead0ca76764f83d66151a6124e662d50f6 /include/linux/libata.h
parent4c90d9717ae27dddf4b02ed7d683e502b539cd1c (diff)
libata: separate out ata_ncq_enabled()
Separate out ata_ncq_enabled(). Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 5db50fa594ac..5233e47eeb89 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1033,6 +1033,21 @@ static inline u8 ata_chk_status(struct ata_port *ap)
1033 return ap->ops->check_status(ap); 1033 return ap->ops->check_status(ap);
1034} 1034}
1035 1035
1036/**
1037 * ata_ncq_enabled - Test whether NCQ is enabled
1038 * @dev: ATA device to test for
1039 *
1040 * LOCKING:
1041 * spin_lock_irqsave(host lock)
1042 *
1043 * RETURNS:
1044 * 1 if NCQ is enabled for @dev, 0 otherwise.
1045 */
1046static inline int ata_ncq_enabled(struct ata_device *dev)
1047{
1048 return (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF |
1049 ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ;
1050}
1036 1051
1037/** 1052/**
1038 * ata_pause - Flush writes and pause 400 nanoseconds. 1053 * ata_pause - Flush writes and pause 400 nanoseconds.