Lines Matching full:slot

57 	struct slot *slot = to_slot(hotplug_slot);  in set_attention_status()  local
69 rc = rtas_set_indicator(DR_INDICATOR, slot->index, value); in set_attention_status()
71 slot->attention_status = value; in set_attention_status()
77 * get_power_status - get power status of a slot
78 * @hotplug_slot: slot to get status
84 struct slot *slot = to_slot(hotplug_slot); in get_power_status() local
86 retval = rtas_get_power_level(slot->power_domain, &level); in get_power_status()
94 * @hotplug_slot: slot to get status
99 struct slot *slot = to_slot(hotplug_slot); in get_attention_status() local
100 *value = slot->attention_status; in get_attention_status()
106 struct slot *slot = to_slot(hotplug_slot); in get_adapter_status() local
109 rc = rpaphp_get_sensor_state(slot, &state); in get_adapter_status()
118 *value = slot->state; in get_adapter_status()
123 static enum pci_bus_speed get_max_bus_speed(struct slot *slot) in get_max_bus_speed() argument
126 switch (slot->type) { in get_max_bus_speed()
171 /* Slot does not have dynamically-removable children */ in get_children_props()
177 /* &drc_names[1] contains NULL terminated slot names */ in get_children_props()
180 /* &drc_types[1] contains NULL terminated slot types */ in get_children_props()
304 * is_php_dn() - return 1 if this is a hotpluggable pci slot, else 0
312 * a hotpluggable slot. This routine will return false
336 struct slot *slot; in rpaphp_drc_info_add_slot() local
360 slot = alloc_slot_struct(dn, drc.drc_index_start, drc_name, drc.drc_power_domain); in rpaphp_drc_info_add_slot()
361 if (!slot) in rpaphp_drc_info_add_slot()
364 slot->type = simple_strtoul(drc.drc_type, NULL, 10); in rpaphp_drc_info_add_slot()
365 retval = rpaphp_enable_slot(slot); in rpaphp_drc_info_add_slot()
367 retval = rpaphp_register_slot(slot); in rpaphp_drc_info_add_slot()
370 dealloc_slot_struct(slot); in rpaphp_drc_info_add_slot()
377 struct slot *slot; in rpaphp_drc_add_slot() local
383 /* If this is not a hotplug slot, return without doing anything. */ in rpaphp_drc_add_slot()
396 slot = alloc_slot_struct(dn, index, name, in rpaphp_drc_add_slot()
398 if (!slot) in rpaphp_drc_add_slot()
401 slot->type = simple_strtoul(type, NULL, 10); in rpaphp_drc_add_slot()
406 retval = rpaphp_enable_slot(slot); in rpaphp_drc_add_slot()
408 retval = rpaphp_register_slot(slot); in rpaphp_drc_add_slot()
411 dealloc_slot_struct(slot); in rpaphp_drc_add_slot()
423 * rpaphp_add_slot -- declare a hotplug slot to the hotplug subsystem.
424 * @dn: device node of slot
426 * This subroutine will register a hotpluggable slot with the
429 * or is called later, by the dlpar add code, if the slot is
432 * If the device node points at an embedded (built-in) slot, this
436 * To remove a slot, it suffices to call rpaphp_deregister_slot().
452 struct slot *slot, *next; in cleanup_slots() local
459 list_for_each_entry_safe(slot, next, &rpaphp_slot_head, in cleanup_slots()
461 list_del(&slot->rpaphp_slot_list); in cleanup_slots()
462 pci_hp_deregister(&slot->hotplug_slot); in cleanup_slots()
463 dealloc_slot_struct(slot); in cleanup_slots()
486 struct slot *slot = to_slot(hotplug_slot); in enable_slot() local
490 if (slot->state == CONFIGURED) in enable_slot()
493 retval = rpaphp_get_sensor_state(slot, &state); in enable_slot()
498 pseries_eeh_init_edev_recursive(PCI_DN(slot->dn)); in enable_slot()
501 pci_hp_add_devices(slot->bus); in enable_slot()
503 slot->state = CONFIGURED; in enable_slot()
505 slot->state = EMPTY; in enable_slot()
507 err("%s: slot[%s] is in invalid state\n", __func__, slot->name); in enable_slot()
508 slot->state = NOT_VALID; in enable_slot()
512 slot->bus->max_bus_speed = get_max_bus_speed(slot); in enable_slot()
518 struct slot *slot = to_slot(hotplug_slot); in disable_slot() local
519 if (slot->state == NOT_CONFIGURED) in disable_slot()
523 pci_hp_remove_devices(slot->bus); in disable_slot()
527 slot->state = NOT_CONFIGURED; in disable_slot()