aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/virtio.h')
-rw-r--r--include/linux/virtio.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index e7d10845b3c1..06005fa9e982 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -76,6 +76,7 @@ struct virtqueue_ops {
76 * @dev: underlying device. 76 * @dev: underlying device.
77 * @id: the device type identification (used to match it with a driver). 77 * @id: the device type identification (used to match it with a driver).
78 * @config: the configuration ops for this device. 78 * @config: the configuration ops for this device.
79 * @features: the features supported by both driver and device.
79 * @priv: private pointer for the driver's use. 80 * @priv: private pointer for the driver's use.
80 */ 81 */
81struct virtio_device 82struct virtio_device
@@ -84,6 +85,8 @@ struct virtio_device
84 struct device dev; 85 struct device dev;
85 struct virtio_device_id id; 86 struct virtio_device_id id;
86 struct virtio_config_ops *config; 87 struct virtio_config_ops *config;
88 /* Note that this is a Linux set_bit-style bitmap. */
89 unsigned long features[1];
87 void *priv; 90 void *priv;
88}; 91};
89 92
@@ -94,6 +97,8 @@ void unregister_virtio_device(struct virtio_device *dev);
94 * virtio_driver - operations for a virtio I/O driver 97 * virtio_driver - operations for a virtio I/O driver
95 * @driver: underlying device driver (populate name and owner). 98 * @driver: underlying device driver (populate name and owner).
96 * @id_table: the ids serviced by this driver. 99 * @id_table: the ids serviced by this driver.
100 * @feature_table: an array of feature numbers supported by this device.
101 * @feature_table_size: number of entries in the feature table array.
97 * @probe: the function to call when a device is found. Returns a token for 102 * @probe: the function to call when a device is found. Returns a token for
98 * remove, or PTR_ERR(). 103 * remove, or PTR_ERR().
99 * @remove: the function when a device is removed. 104 * @remove: the function when a device is removed.
@@ -103,6 +108,8 @@ void unregister_virtio_device(struct virtio_device *dev);
103struct virtio_driver { 108struct virtio_driver {
104 struct device_driver driver; 109 struct device_driver driver;
105 const struct virtio_device_id *id_table; 110 const struct virtio_device_id *id_table;
111 const unsigned int *feature_table;
112 unsigned int feature_table_size;
106 int (*probe)(struct virtio_device *dev); 113 int (*probe)(struct virtio_device *dev);
107 void (*remove)(struct virtio_device *dev); 114 void (*remove)(struct virtio_device *dev);
108 void (*config_changed)(struct virtio_device *dev); 115 void (*config_changed)(struct virtio_device *dev);