Lines Matching full:slot
55 struct slot *slot = to_slot(hotplug_slot); in set_attention_status() local
67 rc = rtas_set_indicator(DR_INDICATOR, slot->index, value); in set_attention_status()
69 slot->attention_status = value; in set_attention_status()
75 * get_power_status - get power status of a slot
76 * @hotplug_slot: slot to get status
82 struct slot *slot = to_slot(hotplug_slot); in get_power_status() local
84 retval = rtas_get_power_level(slot->power_domain, &level); in get_power_status()
92 * @hotplug_slot: slot to get status
97 struct slot *slot = to_slot(hotplug_slot); in get_attention_status() local
98 *value = slot->attention_status; in get_attention_status()
104 struct slot *slot = to_slot(hotplug_slot); in get_adapter_status() local
107 rc = rpaphp_get_sensor_state(slot, &state); in get_adapter_status()
116 *value = slot->state; in get_adapter_status()
121 static enum pci_bus_speed get_max_bus_speed(struct slot *slot) in get_max_bus_speed() argument
124 switch (slot->type) { in get_max_bus_speed()
169 /* Slot does not have dynamically-removable children */ in get_children_props()
175 /* &drc_names[1] contains NULL terminated slot names */ in get_children_props()
178 /* &drc_types[1] contains NULL terminated slot types */ in get_children_props()
300 * is_php_dn() - return 1 if this is a hotpluggable pci slot, else 0
308 * a hotpluggable slot. This routine will return false
330 * rpaphp_add_slot -- declare a hotplug slot to the hotplug subsystem.
331 * @dn: device node of slot
333 * This subroutine will register a hotpluggable slot with the
336 * or is called later, by the dlpar add code, if the slot is
339 * If the device node points at an embedded (built-in) slot, this
343 * To remove a slot, it suffices to call rpaphp_deregister_slot().
347 struct slot *slot; in rpaphp_add_slot() local
356 /* If this is not a hotplug slot, return without doing anything. */ in rpaphp_add_slot()
369 slot = alloc_slot_struct(dn, index, name, in rpaphp_add_slot()
371 if (!slot) in rpaphp_add_slot()
374 slot->type = simple_strtoul(type, NULL, 10); in rpaphp_add_slot()
379 retval = rpaphp_enable_slot(slot); in rpaphp_add_slot()
381 retval = rpaphp_register_slot(slot); in rpaphp_add_slot()
384 dealloc_slot_struct(slot); in rpaphp_add_slot()
398 struct slot *slot, *next; in cleanup_slots() local
405 list_for_each_entry_safe(slot, next, &rpaphp_slot_head, in cleanup_slots()
407 list_del(&slot->rpaphp_slot_list); in cleanup_slots()
408 pci_hp_deregister(&slot->hotplug_slot); in cleanup_slots()
409 dealloc_slot_struct(slot); in cleanup_slots()
432 struct slot *slot = to_slot(hotplug_slot); in enable_slot() local
436 if (slot->state == CONFIGURED) in enable_slot()
439 retval = rpaphp_get_sensor_state(slot, &state); in enable_slot()
445 pci_hp_add_devices(slot->bus); in enable_slot()
447 slot->state = CONFIGURED; in enable_slot()
449 slot->state = EMPTY; in enable_slot()
451 err("%s: slot[%s] is in invalid state\n", __func__, slot->name); in enable_slot()
452 slot->state = NOT_VALID; in enable_slot()
456 slot->bus->max_bus_speed = get_max_bus_speed(slot); in enable_slot()
462 struct slot *slot = to_slot(hotplug_slot); in disable_slot() local
463 if (slot->state == NOT_CONFIGURED) in disable_slot()
467 pci_hp_remove_devices(slot->bus); in disable_slot()
471 slot->state = NOT_CONFIGURED; in disable_slot()