Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+7
+7
arch/sparc/kernel/pci.c
··· 247 247 struct pci_bus *bus, int devfn) 248 248 { 249 249 struct dev_archdata *sd; 250 + struct pci_slot *slot; 250 251 struct of_device *op; 251 252 struct pci_dev *dev; 252 253 const char *type; ··· 287 286 dev->dev.bus = &pci_bus_type; 288 287 dev->devfn = devfn; 289 288 dev->multifunction = 0; /* maybe a lie? */ 289 + set_pcie_port_type(dev); 290 + 291 + list_for_each_entry(slot, &dev->bus->slots, list) 292 + if (PCI_SLOT(dev->devfn) == slot->number) 293 + dev->slot = slot; 290 294 291 295 dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff); 292 296 dev->device = of_getintprop_default(node, "device-id", 0xffff); ··· 328 322 329 323 dev->current_state = 4; /* unknown power state */ 330 324 dev->error_state = pci_channel_io_normal; 325 + dev->dma_mask = 0xffffffff; 331 326 332 327 if (!strcmp(node->name, "pci")) { 333 328 /* a PCI-PCI bridge */