Otherwise QEMU might add a device at slot 0 which isn't supported
by the SHPC controller.

Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
 hw/pci-bridge/pci_bridge_dev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c
index 26aded9..c0355c2 100644
--- a/hw/pci-bridge/pci_bridge_dev.c
+++ b/hw/pci-bridge/pci_bridge_dev.c
@@ -1,3 +1,4 @@
+
 /*
  * Standard PCI Bridge Device
  *
@@ -57,6 +58,8 @@ static int pci_bridge_dev_initfn(PCIDevice *dev)
         goto bridge_error;
     }
     if (bridge_dev->flags & (1 << PCI_BRIDGE_DEV_F_SHPC_REQ)) {
+        /* SHCP gets upset if we try to use slot 0 */
+        br->sec_bus.devfn_min = PCI_FUNC_MAX;
         dev->config[PCI_INTERRUPT_PIN] = 0x1;
         memory_region_init(&bridge_dev->bar, OBJECT(dev), "shpc-bar",
                            shpc_bar_size(dev));
-- 
2.5.0


Reply via email to