diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 19:46:58 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 19:46:58 -0500 |
commit | 35cfc45c582c0df666a817bc5e6cbe7aef5693a0 (patch) | |
tree | 4d953c68b07dfde0e4853ea1d3594ef09fc1e826 /include/linux | |
parent | 8a6d498e864aa3d1ae21fce650452dd13a305769 (diff) | |
parent | 0825788ff27c7145e9d558cb2a26f3837d1f9be5 (diff) | |
download | talos-op-linux-35cfc45c582c0df666a817bc5e6cbe7aef5693a0.tar.gz talos-op-linux-35cfc45c582c0df666a817bc5e6cbe7aef5693a0.zip |
Merge branch 'lba48-opt'
Diffstat (limited to 'include/linux')
-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 94f77cce27fa..a8155ca4947f 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -302,4 +302,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__ */ |