diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-01 01:38:18 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-01 12:33:45 -0500 |
commit | e1211e3fa7fd05ff0d4f597fd37e40de8acc6784 (patch) | |
tree | 672018d7facf99ad4d45b09e2e2980accebdfe38 /include/linux/libata.h | |
parent | 9974e7cc6c8b8ea796c92cdf28db93e4579a4000 (diff) | |
download | lwn-e1211e3fa7fd05ff0d4f597fd37e40de8acc6784.tar.gz lwn-e1211e3fa7fd05ff0d4f597fd37e40de8acc6784.zip |
[PATCH] libata: implement ata_dev_enabled and disabled()
This patch renames ata_dev_present() to ata_dev_enabled() and adds
ata_dev_disabled(). This is to discern the state where a device is
present but disabled from not-present state. This disctinction is
necessary when configuring transfer mode because device selection
timing must not be violated even if a device fails to configure.
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.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0d61357604d5..c6883ba8cba9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -672,14 +672,24 @@ static inline unsigned int ata_tag_valid(unsigned int tag) return (tag < ATA_MAX_QUEUE) ? 1 : 0; } -static inline unsigned int ata_class_present(unsigned int class) +static inline unsigned int ata_class_enabled(unsigned int class) { return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; } -static inline unsigned int ata_dev_present(const struct ata_device *dev) +static inline unsigned int ata_class_disabled(unsigned int class) { - return ata_class_present(dev->class); + return class == ATA_DEV_ATA_UNSUP || class == ATA_DEV_ATAPI_UNSUP; +} + +static inline unsigned int ata_dev_enabled(const struct ata_device *dev) +{ + return ata_class_enabled(dev->class); +} + +static inline unsigned int ata_dev_disabled(const struct ata_device *dev) +{ + return ata_class_disabled(dev->class); } static inline u8 ata_chk_status(struct ata_port *ap) |