aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 16:24:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 16:24:37 -0400
commit95b18e69950ca7fd9acfa55964e929f58bec9379 (patch)
tree5168f81b49cdfa2bcf363e4bd86cbfd669493ebd /include/linux
parent6d8a97af63222c5cbc7fe63ae19345e74e153e90 (diff)
parent6a743897144500fb4c4566ced3a498d5180fbb5b (diff)
Merge tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Pull virtio update from Rusty Russell: "Virtio patches, mainly hotplugging fixes." * tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio-blk: return VIRTIO_BLK_F_FLUSH to header. virtio-blk: allow toggling host cache between writeback and writethrough virtio-blk: Use block layer provided spinlock virtio-blk: Reset device after blk_cleanup_queue() virtio-blk: Call del_gendisk() before disable guest kick virtio: rng: s3/s4 support virtio: rng: split out common code in probe / remove for s3/s4 ops virtio: rng: don't wait on host when module is going away virtio: rng: allow tasks to be killed that are waiting for rng input virtio ids: fix comment for virtio-rng
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/virtio_blk.h10
-rw-r--r--include/linux/virtio_ids.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
index e0edb40ca7aa..6d8e61c48563 100644
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -37,8 +37,14 @@
37#define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ 37#define VIRTIO_BLK_F_RO 5 /* Disk is read-only */
38#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ 38#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/
39#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ 39#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */
40#define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */ 40#define VIRTIO_BLK_F_WCE 9 /* Writeback mode enabled after reset */
41#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */ 41#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
42#define VIRTIO_BLK_F_CONFIG_WCE 11 /* Writeback mode available in config */
43
44#ifndef __KERNEL__
45/* Old (deprecated) name for VIRTIO_BLK_F_WCE. */
46#define VIRTIO_BLK_F_FLUSH VIRTIO_BLK_F_WCE
47#endif
42 48
43#define VIRTIO_BLK_ID_BYTES 20 /* ID string length */ 49#define VIRTIO_BLK_ID_BYTES 20 /* ID string length */
44 50
@@ -69,6 +75,8 @@ struct virtio_blk_config {
69 /* optimal sustained I/O size in logical blocks. */ 75 /* optimal sustained I/O size in logical blocks. */
70 __u32 opt_io_size; 76 __u32 opt_io_size;
71 77
78 /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */
79 __u8 wce;
72} __attribute__((packed)); 80} __attribute__((packed));
73 81
74/* 82/*
diff --git a/include/linux/virtio_ids.h b/include/linux/virtio_ids.h
index 7529b854b7fd..270fb22c5811 100644
--- a/include/linux/virtio_ids.h
+++ b/include/linux/virtio_ids.h
@@ -32,7 +32,7 @@
32#define VIRTIO_ID_NET 1 /* virtio net */ 32#define VIRTIO_ID_NET 1 /* virtio net */
33#define VIRTIO_ID_BLOCK 2 /* virtio block */ 33#define VIRTIO_ID_BLOCK 2 /* virtio block */
34#define VIRTIO_ID_CONSOLE 3 /* virtio console */ 34#define VIRTIO_ID_CONSOLE 3 /* virtio console */
35#define VIRTIO_ID_RNG 4 /* virtio ring */ 35#define VIRTIO_ID_RNG 4 /* virtio rng */
36#define VIRTIO_ID_BALLOON 5 /* virtio balloon */ 36#define VIRTIO_ID_BALLOON 5 /* virtio balloon */
37#define VIRTIO_ID_RPMSG 7 /* virtio remote processor messaging */ 37#define VIRTIO_ID_RPMSG 7 /* virtio remote processor messaging */
38#define VIRTIO_ID_SCSI 8 /* virtio scsi */ 38#define VIRTIO_ID_SCSI 8 /* virtio scsi */