Lines Matching refs:slot
60 static int set_attention_status (struct hotplug_slot *slot, u8 value);
61 static int enable_slot (struct hotplug_slot *slot);
62 static int disable_slot (struct hotplug_slot *slot);
63 static int get_power_status (struct hotplug_slot *slot, u8 *value);
64 static int get_attention_status (struct hotplug_slot *slot, u8 *value);
65 static int get_latch_status (struct hotplug_slot *slot, u8 *value);
66 static int get_adapter_status (struct hotplug_slot *slot, u8 *value);
84 struct slot *slot = hotplug_slot->private; in release_slot() local
86 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in release_slot()
87 __func__, slot_name(slot)); in release_slot()
89 kfree(slot->hotplug_slot->info); in release_slot()
90 kfree(slot->hotplug_slot); in release_slot()
91 kfree(slot); in release_slot()
96 struct slot *slot; in init_slots() local
104 slot = kzalloc(sizeof(*slot), GFP_KERNEL); in init_slots()
105 if (!slot) { in init_slots()
115 slot->hotplug_slot = hotplug_slot; in init_slots()
124 slot->hp_slot = i; in init_slots()
125 slot->ctrl = ctrl; in init_slots()
126 slot->bus = ctrl->pci_dev->subordinate->number; in init_slots()
127 slot->device = ctrl->slot_device_offset + i; in init_slots()
128 slot->hpc_ops = ctrl->hpc_ops; in init_slots()
129 slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i); in init_slots()
131 slot->wq = alloc_workqueue("shpchp-%d", 0, 0, slot->number); in init_slots()
132 if (!slot->wq) { in init_slots()
137 mutex_init(&slot->lock); in init_slots()
138 INIT_DELAYED_WORK(&slot->work, shpchp_queue_pushbutton_work); in init_slots()
141 hotplug_slot->private = slot; in init_slots()
143 snprintf(name, SLOT_NAME_SIZE, "%d", slot->number); in init_slots()
148 slot->bus, slot->device, slot->hp_slot, slot->number, in init_slots()
150 retval = pci_hp_register(slot->hotplug_slot, in init_slots()
151 ctrl->pci_dev->subordinate, slot->device, name); in init_slots()
163 list_add(&slot->slot_list, &ctrl->slot_list); in init_slots()
168 destroy_workqueue(slot->wq); in init_slots()
174 kfree(slot); in init_slots()
183 struct slot *slot; in cleanup_slots() local
186 slot = list_entry(tmp, struct slot, slot_list); in cleanup_slots()
187 list_del(&slot->slot_list); in cleanup_slots()
188 cancel_delayed_work(&slot->work); in cleanup_slots()
189 destroy_workqueue(slot->wq); in cleanup_slots()
190 pci_hp_deregister(slot->hotplug_slot); in cleanup_slots()
199 struct slot *slot = get_slot(hotplug_slot); in set_attention_status() local
201 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in set_attention_status()
202 __func__, slot_name(slot)); in set_attention_status()
205 slot->hpc_ops->set_attention_status(slot, status); in set_attention_status()
212 struct slot *slot = get_slot(hotplug_slot); in enable_slot() local
214 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in enable_slot()
215 __func__, slot_name(slot)); in enable_slot()
217 return shpchp_sysfs_enable_slot(slot); in enable_slot()
222 struct slot *slot = get_slot(hotplug_slot); in disable_slot() local
224 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in disable_slot()
225 __func__, slot_name(slot)); in disable_slot()
227 return shpchp_sysfs_disable_slot(slot); in disable_slot()
232 struct slot *slot = get_slot(hotplug_slot); in get_power_status() local
235 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_power_status()
236 __func__, slot_name(slot)); in get_power_status()
238 retval = slot->hpc_ops->get_power_status(slot, value); in get_power_status()
247 struct slot *slot = get_slot(hotplug_slot); in get_attention_status() local
250 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_attention_status()
251 __func__, slot_name(slot)); in get_attention_status()
253 retval = slot->hpc_ops->get_attention_status(slot, value); in get_attention_status()
262 struct slot *slot = get_slot(hotplug_slot); in get_latch_status() local
265 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_latch_status()
266 __func__, slot_name(slot)); in get_latch_status()
268 retval = slot->hpc_ops->get_latch_status(slot, value); in get_latch_status()
277 struct slot *slot = get_slot(hotplug_slot); in get_adapter_status() local
280 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_adapter_status()
281 __func__, slot_name(slot)); in get_adapter_status()
283 retval = slot->hpc_ops->get_adapter_status(slot, value); in get_adapter_status()