aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-04 12:31:45 -0500
committerMichael S. Tsirkin <mst@redhat.com>2014-12-09 14:42:00 -0500
commitd71a6fc6b97fba1de999c6f0fab5c75544afab76 (patch)
tree4f29a0280f7725f6807af7f28ec9f078b80c7bde
parent63d9f218a3cdaa2316ede9099d6be2c619ec5b9f (diff)
virtio: drop legacy_only driver flag
legacy_only flag is now unused, drop it from core. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-rw-r--r--drivers/virtio/virtio.c4
-rw-r--r--include/linux/virtio.h2
2 files changed, 0 insertions, 6 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index e1673a511d17..f22665868781 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -198,10 +198,6 @@ static int virtio_dev_probe(struct device *_d)
198 driver_features_legacy = driver_features; 198 driver_features_legacy = driver_features;
199 } 199 }
200 200
201 /* Detect legacy-only drivers and disable VIRTIO_F_VERSION_1. */
202 if (drv->legacy_only)
203 device_features &= ~(1ULL << VIRTIO_F_VERSION_1);
204
205 if (device_features & (1ULL << VIRTIO_F_VERSION_1)) 201 if (device_features & (1ULL << VIRTIO_F_VERSION_1))
206 dev->features = driver_features & device_features; 202 dev->features = driver_features & device_features;
207 else 203 else
diff --git a/include/linux/virtio.h b/include/linux/virtio.h
index d666bcb57401..d09e0938fd60 100644
--- a/include/linux/virtio.h
+++ b/include/linux/virtio.h
@@ -134,7 +134,6 @@ int virtio_device_restore(struct virtio_device *dev);
134 * @feature_table_size: number of entries in the feature table array. 134 * @feature_table_size: number of entries in the feature table array.
135 * @feature_table_legacy: same as feature_table but when working in legacy mode. 135 * @feature_table_legacy: same as feature_table but when working in legacy mode.
136 * @feature_table_size_legacy: number of entries in feature table legacy array. 136 * @feature_table_size_legacy: number of entries in feature table legacy array.
137 * @legacy_only: driver does not support virtio 1.0.
138 * @probe: the function to call when a device is found. Returns 0 or -errno. 137 * @probe: the function to call when a device is found. Returns 0 or -errno.
139 * @remove: the function to call when a device is removed. 138 * @remove: the function to call when a device is removed.
140 * @config_changed: optional function to call when the device configuration 139 * @config_changed: optional function to call when the device configuration
@@ -147,7 +146,6 @@ struct virtio_driver {
147 unsigned int feature_table_size; 146 unsigned int feature_table_size;
148 const unsigned int *feature_table_legacy; 147 const unsigned int *feature_table_legacy;
149 unsigned int feature_table_size_legacy; 148 unsigned int feature_table_size_legacy;
150 bool legacy_only;
151 int (*probe)(struct virtio_device *dev); 149 int (*probe)(struct virtio_device *dev);
152 void (*scan)(struct virtio_device *dev); 150 void (*scan)(struct virtio_device *dev);
153 void (*remove)(struct virtio_device *dev); 151 void (*remove)(struct virtio_device *dev);