mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 14:58:13 +08:00
virtio-pci: fix set virtio device features error
Should assgin back the feature to the vdev->features Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
This commit is contained in:
@@ -375,6 +375,7 @@ static void virtio_pci_legacy_set_features(FAR struct virtio_device *vdev,
|
||||
|
||||
pci_write_io_dword(vpdev->dev, vpdev->ioaddr + VIRTIO_PCI_GUEST_FEATURES,
|
||||
vdev->features);
|
||||
vdev->features = features;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -572,6 +572,7 @@ static void virtio_pci_modern_set_features(FAR struct virtio_device *vdev,
|
||||
pci_write_io_dword(vpdev->dev, &cfg->driver_feature, features);
|
||||
pci_write_io_dword(vpdev->dev, &cfg->driver_feature_select, 1);
|
||||
pci_write_io_dword(vpdev->dev, &cfg->driver_feature, 0);
|
||||
vdev->features = features;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user