]> git.proxmox.com Git - qemu.git/commitdiff
PCI: fix bridge configuration
authorBlue Swirl <blauwirbel@gmail.com>
Tue, 26 Jan 2010 21:59:57 +0000 (21:59 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Tue, 26 Jan 2010 21:59:57 +0000 (21:59 +0000)
PCI bridges' qdev info structures must indicate bridge header type,
otherwise critical bridge registers (esp. PCI_PRIMARY_BUS,
PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS) will not be writable.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/apb_pci.c
hw/grackle_pci.c
hw/pci.c
hw/unin_pci.c

index a72c6568181e9bc0110c91ee4652cf5e939c5d05..7f458c60da66ac5913bfff99a7c437d9232f6740 100644 (file)
@@ -365,6 +365,7 @@ static PCIDeviceInfo pbm_pci_host_info = {
     .qdev.name = "pbm",
     .qdev.size = sizeof(PCIDevice),
     .init      = pbm_pci_host_init,
+    .header_type  = PCI_HEADER_TYPE_BRIDGE,
 };
 
 static void pbm_register_devices(void)
index ee4fed53ed023c279ab8cdccc80a2c670c292003..f455c5991b166c666e6c6291b1f77bd7f1778023 100644 (file)
@@ -181,6 +181,7 @@ static PCIDeviceInfo dec_21154_pci_host_info = {
     .qdev.name = "dec-21154",
     .qdev.size = sizeof(PCIDevice),
     .init      = dec_21154_pci_host_init,
+    .header_type  = PCI_HEADER_TYPE_BRIDGE,
 };
 
 static void grackle_register_devices(void)
index b83fd532bc87cec665f400172ed6414290cc5c5e..023f7b6f4a792a4fe994a4339c167783a3535d49 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1874,6 +1874,7 @@ static PCIDeviceInfo bridge_info = {
     .init         = pci_bridge_initfn,
     .exit         = pci_bridge_exitfn,
     .config_write = pci_bridge_write_config,
+    .header_type  = PCI_HEADER_TYPE_BRIDGE,
     .qdev.props   = (Property[]) {
         DEFINE_PROP_HEX32("vendorid", PCIBridge, vid, 0),
         DEFINE_PROP_HEX32("deviceid", PCIBridge, did, 0),
index 3ae4e7a14d0a5e645befdad12e702b7e481bd124..b8a805b7dfefa90f53b173c3297c14f62c009105 100644 (file)
@@ -269,6 +269,7 @@ static PCIDeviceInfo dec_21154_pci_host_info = {
     .qdev.name = "dec-21154",
     .qdev.size = sizeof(PCIDevice),
     .init      = dec_21154_pci_host_init,
+    .header_type  = PCI_HEADER_TYPE_BRIDGE,
 };
 
 static PCIDeviceInfo unin_agp_pci_host_info = {