powerpc/pci: Add missing hookup to pci_slot
Add missing hookup to existing pci_slot when building the pci_dev from scratch off the Open Firmware device-tree Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
bb209c8287
commit
26b4a0ca46
1 changed files with 5 additions and 0 deletions
|
@ -123,6 +123,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
|
||||||
{
|
{
|
||||||
struct pci_dev *dev;
|
struct pci_dev *dev;
|
||||||
const char *type;
|
const char *type;
|
||||||
|
struct pci_slot *slot;
|
||||||
|
|
||||||
dev = alloc_pci_dev();
|
dev = alloc_pci_dev();
|
||||||
if (!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 */
|
dev->needs_freset = 0; /* pcie fundamental reset required */
|
||||||
set_pcie_port_type(dev);
|
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->vendor = get_int_prop(node, "vendor-id", 0xffff);
|
||||||
dev->device = get_int_prop(node, "device-id", 0xffff);
|
dev->device = get_int_prop(node, "device-id", 0xffff);
|
||||||
dev->subsystem_vendor = get_int_prop(node, "subsystem-vendor-id", 0);
|
dev->subsystem_vendor = get_int_prop(node, "subsystem-vendor-id", 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue