Merge branch 'drm-reorg' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[pandora-kernel.git] / include / linux / virtio_blk.h
index bca0b10..5f79a5f 100644 (file)
@@ -9,15 +9,23 @@
 #define VIRTIO_BLK_F_BARRIER   0       /* Does host support barriers? */
 #define VIRTIO_BLK_F_SIZE_MAX  1       /* Indicates maximum segment size */
 #define VIRTIO_BLK_F_SEG_MAX   2       /* Indicates maximum # of segments */
+#define VIRTIO_BLK_F_GEOMETRY  4       /* Legacy geometry available  */
+#define VIRTIO_BLK_F_RO                5       /* Disk is read-only */
 
 struct virtio_blk_config
 {
        /* The capacity (in 512-byte sectors). */
-       __le64 capacity;
+       __u64 capacity;
        /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
-       __le32 size_max;
+       __u32 size_max;
        /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */
-       __le32 seg_max;
+       __u32 seg_max;
+       /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */
+       struct virtio_blk_geometry {
+               __u16 cylinders;
+               __u8 heads;
+               __u8 sectors;
+       } geometry;
 } __attribute__((packed));
 
 /* These two define direction. */
@@ -41,13 +49,8 @@ struct virtio_blk_outhdr
        __u64 sector;
 };
 
+/* And this is the final byte of the write scatter-gather list. */
 #define VIRTIO_BLK_S_OK                0
 #define VIRTIO_BLK_S_IOERR     1
 #define VIRTIO_BLK_S_UNSUPP    2
-
-/* This is the first element of the write scatter-gather list */
-struct virtio_blk_inhdr
-{
-       unsigned char status;
-};
 #endif /* _LINUX_VIRTIO_BLK_H */