Lines Matching refs:hotplug_slot

68 static int enable_slot		(struct hotplug_slot *slot);
69 static int disable_slot (struct hotplug_slot *slot);
70 static int set_attention_status (struct hotplug_slot *slot, u8 value);
71 static int hardware_test (struct hotplug_slot *slot, u32 value);
72 static int get_power_status (struct hotplug_slot *slot, u8 *value);
73 static int get_attention_status (struct hotplug_slot *slot, u8 *value);
74 static int get_latch_status (struct hotplug_slot *slot, u8 *value);
75 static int get_adapter_status (struct hotplug_slot *slot, u8 *value);
76 static int get_address (struct hotplug_slot *slot, u32 *value);
77 static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value);
78 static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value);
107 if (!slot->hotplug_slot) { in slot_paranoia_check()
115 static inline struct slot *get_slot (struct hotplug_slot *hotplug_slot, const char *function) in get_slot() argument
119 if (!hotplug_slot) { in get_slot()
124 slot = (struct slot *)hotplug_slot->private; in get_slot()
138 static int enable_slot (struct hotplug_slot *hotplug_slot) in enable_slot() argument
140 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in enable_slot()
146 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in enable_slot()
162 static int disable_slot (struct hotplug_slot *hotplug_slot) in disable_slot() argument
164 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in disable_slot()
170 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in disable_slot()
187 static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status) in set_attention_status() argument
191 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in set_attention_status()
196 hotplug_slot->info->attention_status = 0; in set_attention_status()
202 hotplug_slot->info->attention_status = 1; in set_attention_status()
216 static int hardware_test (struct hotplug_slot *hotplug_slot, u32 value) in hardware_test() argument
218 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in hardware_test()
224 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in hardware_test()
242 static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value) in get_power_status() argument
244 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in get_power_status()
250 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_power_status()
265 static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value) in get_attention_status() argument
269 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_attention_status()
271 *value = hotplug_slot->info->attention_status; in get_attention_status()
286 static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value) in get_latch_status() argument
288 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in get_latch_status()
294 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_latch_status()
311 static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value) in get_adapter_status() argument
313 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in get_adapter_status()
319 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_adapter_status()
333 static int get_address (struct hotplug_slot *hotplug_slot, u32 *value) in get_address() argument
335 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in get_address()
341 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_address()
350 static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value) in get_max_bus_speed() argument
352 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in get_max_bus_speed()
364 static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value) in get_cur_bus_speed() argument
366 struct slot *slot = get_slot(hotplug_slot, __FUNCTION__); in get_cur_bus_speed()
402 snprintf(slot->hotplug_slot->name, SLOT_NAME_SIZE, "%u", in make_slot_name()
422 slot->hotplug_slot = kmalloc(sizeof(struct hotplug_slot), GFP_KERNEL); in init_slots()
423 if (!slot->hotplug_slot) { in init_slots()
427 memset(slot->hotplug_slot, 0, sizeof(struct hotplug_slot)); in init_slots()
429 slot->hotplug_slot->info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL); in init_slots()
430 if (!slot->hotplug_slot->info) { in init_slots()
431 kfree(slot->hotplug_slot); in init_slots()
435 memset(slot->hotplug_slot->info, 0, sizeof(struct hotplug_slot_info)); in init_slots()
437 slot->hotplug_slot->name = kmalloc(SLOT_NAME_SIZE, GFP_KERNEL); in init_slots()
438 if (!slot->hotplug_slot->name) { in init_slots()
439 kfree(slot->hotplug_slot->info); in init_slots()
440 kfree(slot->hotplug_slot); in init_slots()
448 slot->hotplug_slot->private = slot; in init_slots()
449 slot->hotplug_slot->ops = &acpi_hotplug_slot_ops; in init_slots()
452 slot->hotplug_slot->info->power_status = acpiphp_get_power_status(slot->acpi_slot); in init_slots()
453 slot->hotplug_slot->info->attention_status = acpiphp_get_attention_status(slot->acpi_slot); in init_slots()
454 slot->hotplug_slot->info->latch_status = acpiphp_get_latch_status(slot->acpi_slot); in init_slots()
455 slot->hotplug_slot->info->adapter_status = acpiphp_get_adapter_status(slot->acpi_slot); in init_slots()
459 retval = pci_hp_register(slot->hotplug_slot); in init_slots()
462 kfree(slot->hotplug_slot->info); in init_slots()
463 kfree(slot->hotplug_slot->name); in init_slots()
464 kfree(slot->hotplug_slot); in init_slots()
471 info("Slot [%s] registered\n", slot->hotplug_slot->name); in init_slots()
486 pci_hp_deregister(slot->hotplug_slot); in cleanup_slots()
487 kfree(slot->hotplug_slot->info); in cleanup_slots()
488 kfree(slot->hotplug_slot->name); in cleanup_slots()
489 kfree(slot->hotplug_slot); in cleanup_slots()