]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/ata.h
Merge branch 'upstream-fixes'
[linux-2.6-omap-h63xx.git] / include / linux / ata.h
index 94f77cce27fa10d634b7ffdbeb415d31613833b5..a8155ca4947fadfda0cc6c09f0b098c6f54628fc 100644 (file)
@@ -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__ */