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:
parent
b0d70b76cb
commit
639843ade3
@ -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,
|
pci_write_io_dword(vpdev->dev, vpdev->ioaddr + VIRTIO_PCI_GUEST_FEATURES,
|
||||||
vdev->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, features);
|
||||||
pci_write_io_dword(vpdev->dev, &cfg->driver_feature_select, 1);
|
pci_write_io_dword(vpdev->dev, &cfg->driver_feature_select, 1);
|
||||||
pci_write_io_dword(vpdev->dev, &cfg->driver_feature, 0);
|
pci_write_io_dword(vpdev->dev, &cfg->driver_feature, 0);
|
||||||
|
vdev->features = features;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user