diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-01-27 02:26:46 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-27 02:26:46 -0500 |
commit | 8dd2e3bd57c3b389febba1de6b10372ef507f985 (patch) | |
tree | 1fdb120ec9c0c81f8f2a9452ae6c225d68aed5e3 /include/linux/ata.h | |
parent | 2af5920b81a4cd0a22d40b6b2c38356d3df03e13 (diff) | |
parent | 71e834f563799e09c6bd7d6638993b464fac26f5 (diff) | |
download | kernel_samsung_espresso10-8dd2e3bd57c3b389febba1de6b10372ef507f985.zip kernel_samsung_espresso10-8dd2e3bd57c3b389febba1de6b10372ef507f985.tar.gz kernel_samsung_espresso10-8dd2e3bd57c3b389febba1de6b10372ef507f985.tar.bz2 |
Merge branch 'tmp'
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r-- | include/linux/ata.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 29fa99b..8e88efc 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -313,4 +313,16 @@ static inline int ata_ok(u8 status) == ATA_DRDY); } +static inline int lba_28_ok(u64 block, u32 n_block) +{ + /* check the ending block number */ + return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256); +} + +static inline int lba_48_ok(u64 block, u32 n_block) +{ + /* check the ending block number */ + return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536); +} + #endif /* __LINUX_ATA_H__ */ |