From patchwork Wed Jan 27 03:10:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 75386 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0R3AKRK021274 for ; Wed, 27 Jan 2010 03:10:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752241Ab0A0DKU (ORCPT ); Tue, 26 Jan 2010 22:10:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753624Ab0A0DKU (ORCPT ); Tue, 26 Jan 2010 22:10:20 -0500 Received: from gate.crashing.org ([63.228.1.57]:39931 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752217Ab0A0DKT (ORCPT ); Tue, 26 Jan 2010 22:10:19 -0500 Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id o0R3A8hp024390; Tue, 26 Jan 2010 21:10:11 -0600 Subject: [PATCH 2/3] powerpc/pci: Add missing hookup to pci_slot From: Benjamin Herrenschmidt To: linuxppc-dev Cc: Jesse Barnes , Breno Leitao , Linux PCI Date: Wed, 27 Jan 2010 14:10:05 +1100 Message-ID: <1264561805.3601.164.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index 693eb9a..b6b2e86 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c @@ -123,6 +123,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, { struct pci_dev *dev; const char *type; + struct pci_slot *slot; dev = alloc_pci_dev(); if (!dev) @@ -142,6 +143,10 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, dev->needs_freset = 0; /* pcie fundamental reset required */ set_pcie_port_type(dev); + list_for_each_entry(slot, &dev->bus->slots, list) + if (PCI_SLOT(dev->devfn) == slot->number) + dev->slot = slot; + dev->vendor = get_int_prop(node, "vendor-id", 0xffff); dev->device = get_int_prop(node, "device-id", 0xffff); dev->subsystem_vendor = get_int_prop(node, "subsystem-vendor-id", 0);