From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwJJQ-00036y-Jm for qemu-devel@nongnu.org; Tue, 10 Nov 2015 19:30:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwJJP-0004gw-RR for qemu-devel@nongnu.org; Tue, 10 Nov 2015 19:30:56 -0500 From: Benjamin Herrenschmidt Date: Wed, 11 Nov 2015 11:27:57 +1100 Message-Id: <1447201710-10229-45-git-send-email-benh@kernel.crashing.org> In-Reply-To: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> References: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> Subject: [Qemu-devel] [PATCH 44/77] pci-bridge: Set a supported devfn_min for bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: qemu-devel@nongnu.org Otherwise QEMU might add a device at slot 0 which isn't supported by the SHPC controller. Signed-off-by: Benjamin Herrenschmidt --- 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