diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-17 19:42:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 19:42:08 -0500 |
commit | 172d2d0041fdd4f3617dbdff8296bf279db3d5fb (patch) | |
tree | 5bce3a7e17c05f43239cd6ba01e0005343625858 /arch/sparc | |
parent | 8c2fcadc933f713d51f46ec4dcd9b12830e0df84 (diff) |
sparc64: Sync of_create_pci_dev() with drivers/pci/probe.c changes.
Mirrors powerpc commits bb209c8287d2d55ec4a67e3933346e0a3ee0da76
("powerpc/pci: Add calls to set_pcie_port_type() and set_pcie_hotplug_bridge()")
and 26b4a0ca46985ae9586c194f7859f3838b1230f8
("powerpc/pci: Add missing hookup to pci_slot")
We also need to initialize ->dma_mask explicitly here too.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/pci.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 539e83f8e087..592b03d85167 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -247,6 +247,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
247 | struct pci_bus *bus, int devfn) | 247 | struct pci_bus *bus, int devfn) |
248 | { | 248 | { |
249 | struct dev_archdata *sd; | 249 | struct dev_archdata *sd; |
250 | struct pci_slot *slot; | ||
250 | struct of_device *op; | 251 | struct of_device *op; |
251 | struct pci_dev *dev; | 252 | struct pci_dev *dev; |
252 | const char *type; | 253 | const char *type; |
@@ -286,6 +287,11 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
286 | dev->dev.bus = &pci_bus_type; | 287 | dev->dev.bus = &pci_bus_type; |
287 | dev->devfn = devfn; | 288 | dev->devfn = devfn; |
288 | dev->multifunction = 0; /* maybe a lie? */ | 289 | dev->multifunction = 0; /* maybe a lie? */ |
290 | set_pcie_port_type(dev); | ||
291 | |||
292 | list_for_each_entry(slot, &dev->bus->slots, list) | ||
293 | if (PCI_SLOT(dev->devfn) == slot->number) | ||
294 | dev->slot = slot; | ||
289 | 295 | ||
290 | dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff); | 296 | dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff); |
291 | dev->device = of_getintprop_default(node, "device-id", 0xffff); | 297 | dev->device = of_getintprop_default(node, "device-id", 0xffff); |
@@ -322,6 +328,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
322 | 328 | ||
323 | dev->current_state = 4; /* unknown power state */ | 329 | dev->current_state = 4; /* unknown power state */ |
324 | dev->error_state = pci_channel_io_normal; | 330 | dev->error_state = pci_channel_io_normal; |
331 | dev->dma_mask = 0xffffffff; | ||
325 | 332 | ||
326 | if (!strcmp(node->name, "pci")) { | 333 | if (!strcmp(node->name, "pci")) { |
327 | /* a PCI-PCI bridge */ | 334 | /* a PCI-PCI bridge */ |