summaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_blk.h
diff options
context:
space:
mode:
authorjohn cooper <john.cooper@redhat.com>2010-03-25 01:33:33 -0400
committerRusty Russell <rusty@rustcorp.com.au>2010-05-19 22:15:40 +0930
commit4cb2ea28c55cf5e5ef83aec535099ffce3c583df (patch)
tree5ec629c60a32c67946bb2ce17bf71eb282d18e47 /include/linux/virtio_blk.h
parent537b60d17894b7c19a6060feae40299d7109d6e7 (diff)
Add virtio disk identification support
Add virtio-blk device id (s/n) support via virtio request. Signed-off-by: john cooper <john.cooper@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio_blk.h')
-rw-r--r--include/linux/virtio_blk.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
index e52029e9891..167720d695e 100644
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -17,6 +17,8 @@
#define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */
#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
+#define VIRTIO_BLK_ID_BYTES 20 /* ID string length */
+
struct virtio_blk_config {
/* The capacity (in 512-byte sectors). */
__u64 capacity;
@@ -67,6 +69,9 @@ struct virtio_blk_config {
/* Cache flush command */
#define VIRTIO_BLK_T_FLUSH 4
+/* Get device ID command */
+#define VIRTIO_BLK_T_GET_ID 8
+
/* Barrier before this op. */
#define VIRTIO_BLK_T_BARRIER 0x80000000