diff options
author | Denys Drozdov <denys.drozdov@toradex.com> | 2022-01-10 14:19:41 +0200 |
---|---|---|
committer | Denys Drozdov <denys.drozdov@toradex.com> | 2022-01-10 14:19:41 +0200 |
commit | b9b41da981217b17e1e9171a781c65ae8dde1688 (patch) | |
tree | a687d6a640218d96f79c186265bdd9fb16c88a28 /drivers/virtio | |
parent | e99f775ed2f46b225106f0a156116a0080d16740 (diff) | |
parent | 4f508aa9dd3bde7a1c5e4e6de72abb8a03fd504a (diff) |
Merge tag 'v5.4.155' into HEAD
This is the 5.4.155 stable release
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 59a05f1b8105..91627e744326 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -225,6 +225,17 @@ static int virtio_dev_probe(struct device *_d) driver_features_legacy = driver_features; } + /* + * Some devices detect legacy solely via F_VERSION_1. Write + * F_VERSION_1 to force LE config space accesses before FEATURES_OK for + * these when needed. + */ + if (drv->validate && !virtio_legacy_is_little_endian() + && device_features & BIT_ULL(VIRTIO_F_VERSION_1)) { + dev->features = BIT_ULL(VIRTIO_F_VERSION_1); + dev->config->finalize_features(dev); + } + if (device_features & (1ULL << VIRTIO_F_VERSION_1)) dev->features = driver_features & device_features; else |