search for: driver_features_legacy

Displaying 20 results from an estimated 38 matches for "driver_features_legacy".

2014 Nov 25
2
[PATCH v4 11/42] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature tables for virtio v1.0 */ + if (dr...
2014 Nov 25
2
[PATCH v4 11/42] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature tables for virtio v1.0 */ + if (dr...
2014 Oct 23
0
[PATCH RFC v4 11/17] virtio: add legacy feature table support
...b/drivers/virtio/virtio.c index 0f44cff..85a164e 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -161,6 +161,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +178,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature tables for virtio v1.0 */ + if (dr...
2014 Oct 23
0
[PATCH RFC v4 11/17] virtio: add legacy feature table support
...b/drivers/virtio/virtio.c index 0f44cff..85a164e 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -161,6 +161,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +178,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature tables for virtio v1.0 */ + if (dr...
2014 Nov 27
0
[PATCH v5 13/45] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature table for virtio v1.0 */ + if (drv...
2014 Nov 27
0
[PATCH v6 14/46] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature table for virtio v1.0 */ + if (drv...
2014 Nov 27
0
[PATCH v5 13/45] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature table for virtio v1.0 */ + if (drv...
2014 Nov 24
0
[PATCH v3 10/41] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature tables for virtio v1.0 */ + if (dr...
2014 Nov 27
0
[PATCH v6 14/46] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature table for virtio v1.0 */ + if (drv...
2014 Nov 24
0
[PATCH v3 10/41] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature tables for virtio v1.0 */ + if (dr...
2014 Dec 01
0
[PATCH v8 14/50] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature table for virtio v1.0 */ + if (drv...
2014 Dec 01
0
[PATCH v8 14/50] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature table for virtio v1.0 */ + if (drv...
2014 Nov 30
1
[PATCH v7 14/46] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature table for virtio v1.0 */ + if (drv...
2014 Nov 30
1
[PATCH v7 14/46] virtio: add legacy feature table support
...re_table_legacy[i] == fbit) + return; + } + BUG(); } EXPORT_SYMBOL_GPL(virtio_check_driver_offered_feature); @@ -161,6 +168,7 @@ static int virtio_dev_probe(struct device *_d) struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; + u64 driver_features_legacy; unsigned status; /* We have a driver! */ @@ -177,7 +185,22 @@ static int virtio_dev_probe(struct device *_d) driver_features |= (1ULL << f); } - dev->features = driver_features & device_features; + /* Some drivers have a separate feature table for virtio v1.0 */ + if (drv...
2014 Nov 25
0
[PATCH v4 11/42] virtio: add legacy feature table support
...s |= (1ULL << f); > } > > - dev->features = driver_features & device_features; > + /* Some drivers have a separate feature tables for virtio v1.0 */ /* some drivers have a separate feature table for legacy virtio */ ? > + if (drv->feature_table_legacy) { > + driver_features_legacy = 0; > + for (i = 0; i < drv->feature_table_size_legacy; i++) { > + unsigned int f = drv->feature_table_legacy[i]; > + BUG_ON(f >= 64); > + driver_features_legacy |= (1ULL << f); > + } > + } else { > + driver_features_legacy = driver_features; > +...
2014 Nov 25
1
[PATCH v4 11/42] virtio: add legacy feature table support
...drivers have a separate feature tables for virtio v1.0 */ > > /* some drivers have a separate feature table for legacy virtio */ > > ? I prefer have separate feature tables: drivers (plural) have tables (plural). Agree? > > + if (drv->feature_table_legacy) { > > + driver_features_legacy = 0; > > + for (i = 0; i < drv->feature_table_size_legacy; i++) { > > + unsigned int f = drv->feature_table_legacy[i]; > > + BUG_ON(f >= 64); > > + driver_features_legacy |= (1ULL << f); > > + } > > + } else { > > + driver_feature...
2014 Nov 25
1
[PATCH v4 11/42] virtio: add legacy feature table support
...drivers have a separate feature tables for virtio v1.0 */ > > /* some drivers have a separate feature table for legacy virtio */ > > ? I prefer have separate feature tables: drivers (plural) have tables (plural). Agree? > > + if (drv->feature_table_legacy) { > > + driver_features_legacy = 0; > > + for (i = 0; i < drv->feature_table_size_legacy; i++) { > > + unsigned int f = drv->feature_table_legacy[i]; > > + BUG_ON(f >= 64); > > + driver_features_legacy |= (1ULL << f); > > + } > > + } else { > > + driver_feature...
2014 Dec 01
0
[PATCH v8 49/50] virtio: make VIRTIO_F_VERSION_1 a transport bit
...when the ring is completely used, even if we've * suppressed them? */ diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index f9ad99c..fa6b75d 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -197,7 +197,11 @@ static int virtio_dev_probe(struct device *_d) driver_features_legacy = driver_features; } - if (driver_features & device_features & (1ULL << VIRTIO_F_VERSION_1)) + /* Detect legacy-only drivers and disable VIRTIO_F_VERSION_1. */ + if (drv->legacy_only) + device_features &= ~(1ULL << VIRTIO_F_VERSION_1); + + if (device_features & (...
2014 Dec 01
0
[PATCH v8 49/50] virtio: make VIRTIO_F_VERSION_1 a transport bit
...when the ring is completely used, even if we've * suppressed them? */ diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index f9ad99c..fa6b75d 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -197,7 +197,11 @@ static int virtio_dev_probe(struct device *_d) driver_features_legacy = driver_features; } - if (driver_features & device_features & (1ULL << VIRTIO_F_VERSION_1)) + /* Detect legacy-only drivers and disable VIRTIO_F_VERSION_1. */ + if (drv->legacy_only) + device_features &= ~(1ULL << VIRTIO_F_VERSION_1); + + if (device_features & (...
2023 Apr 30
1
[RFC PATCH net 1/3] virtio: re-negotiate features if probe fails and features are blocked
...; -static int virtio_dev_probe(struct device *_d) +static int virtio_negotiate_features(struct virtio_device *dev) { - int err, i; - struct virtio_device *dev = dev_to_virtio(_d); struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); u64 device_features; u64 driver_features; u64 driver_features_legacy; - - /* We have a driver! */ - virtio_add_status(dev, VIRTIO_CONFIG_S_DRIVER); + int i, ret; /* Figure out what features the device supports. */ device_features = dev->config->get_features(dev); @@ -279,30 +282,61 @@ static int virtio_dev_probe(struct device *_d) if (device_features...