diff options
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r-- | include/linux/virtio.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index b46671e28de2..65261a7244fc 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -78,6 +78,10 @@ bool virtqueue_is_broken(struct virtqueue *vq); | |||
78 | /** | 78 | /** |
79 | * virtio_device - representation of a device using virtio | 79 | * virtio_device - representation of a device using virtio |
80 | * @index: unique position on the virtio bus | 80 | * @index: unique position on the virtio bus |
81 | * @failed: saved value for CONFIG_S_FAILED bit (for restore) | ||
82 | * @config_enabled: configuration change reporting enabled | ||
83 | * @config_change_pending: configuration change reported while disabled | ||
84 | * @config_lock: protects configuration change reporting | ||
81 | * @dev: underlying device. | 85 | * @dev: underlying device. |
82 | * @id: the device type identification (used to match it with a driver). | 86 | * @id: the device type identification (used to match it with a driver). |
83 | * @config: the configuration ops for this device. | 87 | * @config: the configuration ops for this device. |
@@ -88,6 +92,10 @@ bool virtqueue_is_broken(struct virtqueue *vq); | |||
88 | */ | 92 | */ |
89 | struct virtio_device { | 93 | struct virtio_device { |
90 | int index; | 94 | int index; |
95 | bool failed; | ||
96 | bool config_enabled; | ||
97 | bool config_change_pending; | ||
98 | spinlock_t config_lock; | ||
91 | struct device dev; | 99 | struct device dev; |
92 | struct virtio_device_id id; | 100 | struct virtio_device_id id; |
93 | const struct virtio_config_ops *config; | 101 | const struct virtio_config_ops *config; |
@@ -108,6 +116,12 @@ void unregister_virtio_device(struct virtio_device *dev); | |||
108 | 116 | ||
109 | void virtio_break_device(struct virtio_device *dev); | 117 | void virtio_break_device(struct virtio_device *dev); |
110 | 118 | ||
119 | void virtio_config_changed(struct virtio_device *dev); | ||
120 | #ifdef CONFIG_PM_SLEEP | ||
121 | int virtio_device_freeze(struct virtio_device *dev); | ||
122 | int virtio_device_restore(struct virtio_device *dev); | ||
123 | #endif | ||
124 | |||
111 | /** | 125 | /** |
112 | * virtio_driver - operations for a virtio I/O driver | 126 | * virtio_driver - operations for a virtio I/O driver |
113 | * @driver: underlying device driver (populate name and owner). | 127 | * @driver: underlying device driver (populate name and owner). |