aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/libata.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index c227dace1d26..f4284bf89758 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -888,6 +888,9 @@ static inline unsigned int ata_tag_internal(unsigned int tag)
888 return tag == ATA_MAX_QUEUE - 1; 888 return tag == ATA_MAX_QUEUE - 1;
889} 889}
890 890
891/*
892 * device helpers
893 */
891static inline unsigned int ata_class_enabled(unsigned int class) 894static inline unsigned int ata_class_enabled(unsigned int class)
892{ 895{
893 return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; 896 return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI;
@@ -918,6 +921,17 @@ static inline unsigned int ata_dev_absent(const struct ata_device *dev)
918 return ata_class_absent(dev->class); 921 return ata_class_absent(dev->class);
919} 922}
920 923
924/*
925 * port helpers
926 */
927static inline int ata_port_max_devices(const struct ata_port *ap)
928{
929 if (ap->flags & ATA_FLAG_SLAVE_POSS)
930 return 2;
931 return 1;
932}
933
934
921static inline u8 ata_chk_status(struct ata_port *ap) 935static inline u8 ata_chk_status(struct ata_port *ap)
922{ 936{
923 return ap->ops->check_status(ap); 937 return ap->ops->check_status(ap);