Use pci_config_set_revision(). Signed-off-by: Sebastian Herbszt <herb...@gmx.de>
diff --git a/hw/xio3130_downstream.c b/hw/xio3130_downstream.c index 1a2d258..fe16475 100644 --- a/hw/xio3130_downstream.c +++ b/hw/xio3130_downstream.c @@ -71,7 +71,7 @@ static int xio3130_downstream_initfn(PCIDevice *d) pcie_port_init_reg(d); pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_TI); pci_config_set_device_id(d->config, PCI_DEVICE_ID_TI_XIO3130D); - d->config[PCI_REVISION_ID] = XIO3130_REVISION; + pci_config_set_revision(d->config, XIO3130_REVISION); rc = msi_init(d, XIO3130_MSI_OFFSET, XIO3130_MSI_NR_VECTOR, XIO3130_MSI_SUPPORTED_FLAGS & PCI_MSI_FLAGS_64BIT, diff --git a/hw/xio3130_upstream.c b/hw/xio3130_upstream.c index 387bf6c..bd2b452 100644 --- a/hw/xio3130_upstream.c +++ b/hw/xio3130_upstream.c @@ -67,7 +67,7 @@ static int xio3130_upstream_initfn(PCIDevice *d) pcie_port_init_reg(d); pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_TI); pci_config_set_device_id(d->config, PCI_DEVICE_ID_TI_XIO3130U); - d->config[PCI_REVISION_ID] = XIO3130_REVISION; + pci_config_set_revision(d->config, XIO3130_REVISION); rc = msi_init(d, XIO3130_MSI_OFFSET, XIO3130_MSI_NR_VECTOR, XIO3130_MSI_SUPPORTED_FLAGS & PCI_MSI_FLAGS_64BIT,