Merge branch 'tmp'

This commit is contained in:
Jeff Garzik 2006-01-27 02:26:46 -05:00
commit 8dd2e3bd57
6 changed files with 212 additions and 93 deletions

View file

@ -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__ */