mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
[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>
This commit is contained in:
parent
9974e7cc6c
commit
e1211e3fa7
5 changed files with 29 additions and 19 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue