Lines Matching refs:slot

52 static int enable_slot(struct hotplug_slot *slot);
53 static int disable_slot(struct hotplug_slot *slot);
54 static int set_attention_status(struct hotplug_slot *slot, u8 value);
55 static int get_power_status(struct hotplug_slot *slot, u8 *value);
56 static int get_attention_status(struct hotplug_slot *slot, u8 *value);
57 static int get_adapter_status(struct hotplug_slot *slot, u8 *value);
58 static int get_latch_status(struct hotplug_slot *slot, u8 *value);
73 struct slot *slot = to_slot(hotplug_slot); in enable_slot() local
75 dbg("%s - physical_slot = %s", __func__, slot_name(slot)); in enable_slot()
83 struct slot *slot = to_slot(hotplug_slot); in disable_slot() local
86 dbg("%s - physical_slot = %s", __func__, slot_name(slot)); in disable_slot()
91 dbg("%s - unconfiguring slot %s", __func__, slot_name(slot)); in disable_slot()
92 retval = cpci_unconfigure_slot(slot); in disable_slot()
95 __func__, slot_name(slot)); in disable_slot()
98 dbg("%s - finished unconfiguring slot %s", __func__, slot_name(slot)); in disable_slot()
101 if (cpci_clear_ext(slot)) { in disable_slot()
103 __func__, slot_name(slot)); in disable_slot()
107 cpci_led_on(slot); in disable_slot()
109 slot->adapter_status = 0; in disable_slot()
111 if (slot->extracting) { in disable_slot()
112 slot->extracting = 0; in disable_slot()
121 cpci_get_power_status(struct slot *slot) in cpci_get_power_status() argument
129 struct slot *slot = to_slot(hotplug_slot); in get_power_status() local
131 *value = cpci_get_power_status(slot); in get_power_status()
138 struct slot *slot = to_slot(hotplug_slot); in get_attention_status() local
140 *value = cpci_get_attention_status(slot); in get_attention_status()
153 struct slot *slot = to_slot(hotplug_slot); in get_adapter_status() local
155 *value = slot->adapter_status; in get_adapter_status()
162 struct slot *slot = to_slot(hotplug_slot); in get_latch_status() local
164 *value = slot->latch_status; in get_latch_status()
168 static void release_slot(struct slot *slot) in release_slot() argument
170 pci_dev_put(slot->dev); in release_slot()
171 kfree(slot); in release_slot()
179 struct slot *slot; in cpci_hp_register_bus() local
192 slot = kzalloc(sizeof(struct slot), GFP_KERNEL); in cpci_hp_register_bus()
193 if (!slot) { in cpci_hp_register_bus()
198 slot->bus = bus; in cpci_hp_register_bus()
199 slot->number = i; in cpci_hp_register_bus()
200 slot->devfn = PCI_DEVFN(i, 0); in cpci_hp_register_bus()
204 slot->hotplug_slot.ops = &cpci_hotplug_slot_ops; in cpci_hp_register_bus()
207 status = pci_hp_register(&slot->hotplug_slot, bus, i, name); in cpci_hp_register_bus()
212 dbg("slot registered with name: %s", slot_name(slot)); in cpci_hp_register_bus()
216 list_add(&slot->slot_list, &slot_list); in cpci_hp_register_bus()
222 kfree(slot); in cpci_hp_register_bus()
231 struct slot *slot; in cpci_hp_unregister_bus() local
232 struct slot *tmp; in cpci_hp_unregister_bus()
240 list_for_each_entry_safe(slot, tmp, &slot_list, slot_list) { in cpci_hp_unregister_bus()
241 if (slot->bus == bus) { in cpci_hp_unregister_bus()
242 list_del(&slot->slot_list); in cpci_hp_unregister_bus()
245 dbg("deregistering slot %s", slot_name(slot)); in cpci_hp_unregister_bus()
246 pci_hp_deregister(&slot->hotplug_slot); in cpci_hp_unregister_bus()
247 release_slot(slot); in cpci_hp_unregister_bus()
284 struct slot *slot; in init_slots() local
293 list_for_each_entry(slot, &slot_list, slot_list) { in init_slots()
294 dbg("%s - looking at slot %s", __func__, slot_name(slot)); in init_slots()
295 if (clear_ins && cpci_check_and_clear_ins(slot)) in init_slots()
297 __func__, slot_name(slot)); in init_slots()
298 dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0)); in init_slots()
300 slot->adapter_status = 1; in init_slots()
301 slot->latch_status = 1; in init_slots()
302 slot->dev = dev; in init_slots()
313 struct slot *slot; in check_slots() local
325 list_for_each_entry(slot, &slot_list, slot_list) { in check_slots()
326 dbg("%s - looking at slot %s", __func__, slot_name(slot)); in check_slots()
327 if (cpci_check_and_clear_ins(slot)) { in check_slots()
332 if (slot->dev) { in check_slots()
334 slot_name(slot)); in check_slots()
340 dbg("%s - slot %s inserted", __func__, slot_name(slot)); in check_slots()
343 hs_csr = cpci_get_hs_csr(slot); in check_slots()
345 __func__, slot_name(slot), hs_csr); in check_slots()
349 __func__, slot_name(slot)); in check_slots()
350 if (cpci_configure_slot(slot)) { in check_slots()
352 __func__, slot_name(slot)); in check_slots()
356 __func__, slot_name(slot)); in check_slots()
359 hs_csr = cpci_get_hs_csr(slot); in check_slots()
361 __func__, slot_name(slot), hs_csr); in check_slots()
363 slot->latch_status = 1; in check_slots()
364 slot->adapter_status = 1; in check_slots()
366 cpci_led_off(slot); in check_slots()
369 hs_csr = cpci_get_hs_csr(slot); in check_slots()
371 __func__, slot_name(slot), hs_csr); in check_slots()
374 } else if (cpci_check_ext(slot)) { in check_slots()
377 __func__, slot_name(slot)); in check_slots()
380 hs_csr = cpci_get_hs_csr(slot); in check_slots()
382 __func__, slot_name(slot), hs_csr); in check_slots()
384 if (!slot->extracting) { in check_slots()
385 slot->latch_status = 0; in check_slots()
386 slot->extracting = 1; in check_slots()
390 } else if (slot->extracting) { in check_slots()
391 hs_csr = cpci_get_hs_csr(slot); in check_slots()
398 slot_name(slot)); in check_slots()
399 slot->adapter_status = 0; in check_slots()
400 slot->extracting = 0; in check_slots()
536 struct slot *slot; in cleanup_slots() local
537 struct slot *tmp; in cleanup_slots()
546 list_for_each_entry_safe(slot, tmp, &slot_list, slot_list) { in cleanup_slots()
547 list_del(&slot->slot_list); in cleanup_slots()
548 pci_hp_deregister(&slot->hotplug_slot); in cleanup_slots()
549 release_slot(slot); in cleanup_slots()