Lines Matching refs:pci_bus
60 struct pci_bus *pci_bus; member
108 static int sn_pci_slot_valid(struct pci_bus *pci_bus, int device) in sn_pci_slot_valid() argument
113 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus); in sn_pci_slot_valid()
119 ioboard_type = sn_ioboard_to_pci_bus(pci_bus); in sn_pci_slot_valid()
121 segment = pci_domain_nr(pci_bus) & 0xf; in sn_pci_slot_valid()
132 static int sn_pci_bus_valid(struct pci_bus *pci_bus) in sn_pci_bus_valid() argument
139 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus); in sn_pci_bus_valid()
145 ioboard_type = sn_ioboard_to_pci_bus(pci_bus); in sn_pci_bus_valid()
163 struct pci_bus *pci_bus, int device, in sn_hp_slot_private_alloc() argument
169 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(pci_bus); in sn_hp_slot_private_alloc()
177 slot->pci_bus = pci_bus; in sn_hp_slot_private_alloc()
179 pci_domain_nr(pci_bus), in sn_hp_slot_private_alloc()
183 sn_generate_path(pci_bus, slot->physical_path); in sn_hp_slot_private_alloc()
211 struct pci_bus *subordinate_bus; in sn_bus_free_data()
238 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); in sn_slot_enable()
248 dev_dbg(&slot->pci_bus->self->dev, "is already active\n"); in sn_slot_enable()
253 dev_dbg(&slot->pci_bus->self->dev, "L1 failure %d with message: %s", in sn_slot_enable()
259 dev_dbg(&slot->pci_bus->self->dev, "insert failed with error %d sub-error %d\n", in sn_slot_enable()
264 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); in sn_slot_enable()
278 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); in sn_slot_disable()
284 dev_dbg(&slot->pci_bus->self->dev, "Slot %s already inactive\n", slot->physical_path); in sn_slot_disable()
289 dev_dbg(&slot->pci_bus->self->dev, "Cannot remove last 33MHz card\n"); in sn_slot_disable()
294 dev_dbg(&slot->pci_bus->self->dev, "L1 failure %d with message \n%s\n", in sn_slot_disable()
300 dev_dbg(&slot->pci_bus->self->dev, "remove failed with error %d sub-error %d\n", in sn_slot_disable()
309 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); in sn_slot_disable()
311 dev_dbg(&slot->pci_bus->self->dev, "remove successful\n"); in sn_slot_disable()
316 dev_dbg(&slot->pci_bus->self->dev,"remove failed rc = %d\n", rc); in sn_slot_disable()
330 struct pci_bus *new_bus = NULL; in enable_slot()
366 num_funcs = pci_scan_slot(slot->pci_bus, in enable_slot()
369 dev_dbg(&slot->pci_bus->self->dev, "no device in slot\n"); in enable_slot()
379 list_for_each_entry(dev, &slot->pci_bus->devices, bus_list) { in enable_slot()
412 phandle = acpi_device_handle(PCI_CONTROLLER(slot->pci_bus)->companion); in enable_slot()
415 dev_dbg(&slot->pci_bus->self->dev, "no parent device, assuming NULL\n"); in enable_slot()
457 pci_bus_add_devices(slot->pci_bus); in enable_slot()
466 dev_dbg(&slot->pci_bus->self->dev, "insert operation successful\n"); in enable_slot()
468 dev_dbg(&slot->pci_bus->self->dev, "insert operation failed rc = %d\n", rc); in enable_slot()
491 PCI_CONTROLLER(slot->pci_bus)->companion) { in disable_slot()
500 phandle = acpi_device_handle(PCI_CONTROLLER(slot->pci_bus)->companion); in disable_slot()
538 list_for_each_entry_safe(dev, temp, &slot->pci_bus->devices, bus_list) { in disable_slot()
581 pcibus_info = SN_PCIBUS_BUSSOFT_INFO(slot->pci_bus); in get_power_status()
596 static int sn_hotplug_slot_register(struct pci_bus *pci_bus) in sn_hotplug_slot_register() argument
610 if (sn_pci_slot_valid(pci_bus, device) != 1) in sn_hotplug_slot_register()
629 pci_bus, device, name)) { in sn_hotplug_slot_register()
636 rc = pci_hp_register(bss_hotplug_slot, pci_bus, device, name); in sn_hotplug_slot_register()
646 dev_dbg(&pci_bus->self->dev, "Registered bus with hotplug\n"); in sn_hotplug_slot_register()
650 dev_dbg(&pci_bus->self->dev, "bus failed to register with err = %d\n", in sn_hotplug_slot_register()
655 dev_dbg(&pci_bus->self->dev, "Memory allocation error\n"); in sn_hotplug_slot_register()
670 struct pci_bus *pci_bus = NULL; in sn_pci_hotplug_init() local
682 while ((pci_bus = pci_find_next_bus(pci_bus))) { in sn_pci_hotplug_init()
683 if (!pci_bus->sysdata) in sn_pci_hotplug_init()
686 rc = sn_pci_bus_valid(pci_bus); in sn_pci_hotplug_init()
688 dev_dbg(&pci_bus->self->dev, "not a valid hotplug bus\n"); in sn_pci_hotplug_init()
691 dev_dbg(&pci_bus->self->dev, "valid hotplug bus\n"); in sn_pci_hotplug_init()
693 rc = sn_hotplug_slot_register(pci_bus); in sn_pci_hotplug_init()