use pci_create_simple_mf() for normal device which sets multifunction bit. At the moment, only pc_piix.c and mips_malta.c uses multifunction devices with piix3/4 pci-isa bridge. And other boards don't populate those devices.
Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp> --- hw/piix4.c | 3 +-- hw/piix_pci.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/piix4.c b/hw/piix4.c index 03926a7..298c70f 100644 --- a/hw/piix4.c +++ b/hw/piix4.c @@ -93,7 +93,6 @@ static int piix4_initfn(PCIDevice *d) pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371AB_0); // 82371AB/EB/MB PIIX4 PCI-to-ISA bridge pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_ISA); - pci_conf[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION; piix4_dev = d; qemu_register_reset(piix4_reset, d); @@ -104,7 +103,7 @@ int piix4_init(PCIBus *bus, int devfn) { PCIDevice *d; - d = pci_create_simple(bus, devfn, "PIIX4"); + d = pci_create_simple_mf(bus, devfn, 1, "PIIX4"); return d->devfn; } diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 0b0c92b..7cd33e6 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -234,7 +234,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn, qemu_irq * *pi440fx_state = DO_UPCAST(PCII440FXState, dev, d); piix3 = DO_UPCAST(PIIX3State, dev, - pci_create_simple(b, -1, "PIIX3")); + pci_create_simple_mf(b, -1, 1, "PIIX3")); piix3->pic = pic; pci_bus_irqs(b, piix3_set_irq, pci_slot_get_pirq, piix3, 4); (*pi440fx_state)->piix3 = piix3; @@ -336,7 +336,6 @@ static int piix3_initfn(PCIDevice *dev) pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL); pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_INTEL_82371SB_0); // 82371SB PIIX3 PCI-to-ISA bridge (Step A1) pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_ISA); - pci_conf[PCI_HEADER_TYPE] |= PCI_HEADER_TYPE_MULTI_FUNCTION; qemu_register_reset(piix3_reset, d); return 0; -- 1.6.6.1