qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2] pci/multi function bit: fix v582c686.c.


From: Isaku Yamahata
Subject: [Qemu-devel] [PATCH v2] pci/multi function bit: fix v582c686.c.
Date: Mon, 12 Jul 2010 20:53:57 +0900

The file, v582c686.c, was added after the change set of
b80d4a9887fa4b6cc63f8c3a13ab2a45054d3e5c and
fecb93c45c749a4c994d8d12bdee17ce2012de9e
are created, but before the patch series was commit.
So similar fix is needed to v582c686.c.

Cc: Huacai Chen <address@hidden>
Cc: Aurelien Jarno <address@hidden>
Cc: Michael S. Tsirkin <address@hidden>
Cc: Blue Swirl <address@hidden>
Signed-off-by: Isaku Yamahata <address@hidden>

---
changes v1 -> v2:
- added hw/ide/via.c

This is only compile tested.
---
 hw/ide/via.c  |    1 -
 hw/vt82c686.c |    5 +----
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/hw/ide/via.c b/hw/ide/via.c
index a403e8c..b2c7cad 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -150,7 +150,6 @@ static int vt82c686b_ide_initfn(PCIDevice *dev)
     pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_IDE);
     pci_config_set_prog_interface(pci_conf, 0x8a); /* legacy ATA mode */
     pci_config_set_revision(pci_conf,0x06); /* Revision 0.6 */
-    pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; /* header_type */
     pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
 
     qemu_register_reset(via_reset, d);
diff --git a/hw/vt82c686.c b/hw/vt82c686.c
index a0c5747..cacc217 100644
--- a/hw/vt82c686.c
+++ b/hw/vt82c686.c
@@ -468,7 +468,6 @@ static int vt82c686b_pm_initfn(PCIDevice *dev)
     pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_VIA_ACPI);
     pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_OTHER);
     pci_config_set_revision(pci_conf, 0x40);
-    pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; // header_type
 
     pci_set_word(pci_conf + PCI_COMMAND, 0);
     pci_set_word(pci_conf + PCI_STATUS, PCI_STATUS_FAST_BACK |
@@ -556,8 +555,6 @@ static int vt82c686b_initfn(PCIDevice *d)
     pci_config_set_class(pci_conf, PCI_CLASS_BRIDGE_ISA);
     pci_config_set_prog_interface(pci_conf, 0x0);
     pci_config_set_revision(pci_conf,0x40); /* Revision 4.0 */
-    pci_conf[PCI_HEADER_TYPE] =
-        PCI_HEADER_TYPE_NORMAL | PCI_HEADER_TYPE_MULTI_FUNCTION;
 
     wmask = d->wmask;
     for (i = 0x00; i < 0xff; i++) {
@@ -575,7 +572,7 @@ int vt82c686b_init(PCIBus *bus, int devfn)
 {
     PCIDevice *d;
 
-    d = pci_create_simple(bus, devfn, "VT82C686B");
+    d = pci_create_simple_multifunction(bus, devfn, true, "VT82C686B");
 
     return d->devfn;
 }
-- 
1.7.1.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]