diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2004-07-03 14:42:40 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2004-07-03 14:42:40 -0400 |
| commit | 1ed9ed8fb921d0840b3c27e11c8a2854ea789605 (patch) | |
| tree | 211273f09546c5bc5164a0a36c9a4243629672c0 /include | |
| parent | ea21e4ac2f5d655db154b64329c437688c92f7d5 (diff) | |
[ata] add ata_ok() inlined helper, and ATA_{DRDY,DF} bit to linux/ata.h
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/ata.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 38ccb84c039e..7a99d7ee2f89 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -78,9 +78,11 @@ enum { ATA_NIEN = (1 << 1), /* disable-irq flag */ ATA_LBA = (1 << 6), /* LBA28 selector */ ATA_DEV1 = (1 << 4), /* Select Device 1 (slave) */ - ATA_BUSY = (1 << 7), /* BSY status bit */ ATA_DEVICE_OBS = (1 << 7) | (1 << 5), /* obs bits in dev reg */ ATA_DEVCTL_OBS = (1 << 3), /* obsolete bit in devctl reg */ + ATA_BUSY = (1 << 7), /* BSY status bit */ + ATA_DRDY = (1 << 6), /* device ready */ + ATA_DF = (1 << 5), /* device fault */ ATA_DRQ = (1 << 3), /* data request i/o */ ATA_ERR = (1 << 0), /* have an error */ ATA_SRST = (1 << 2), /* software reset */ @@ -224,4 +226,10 @@ static inline int is_atapi_taskfile(struct ata_taskfile *tf) (tf->protocol == ATA_PROT_ATAPI_DMA); } +static inline int ata_ok(u8 status) +{ + return ((status & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ | ATA_ERR)) + == ATA_DRDY); +} + #endif /* __LINUX_ATA_H__ */ |
