Lines Matching refs:slot

45 static int set_attention_status(struct hotplug_slot *slot, u8 value);
46 static int enable_slot(struct hotplug_slot *slot);
47 static int disable_slot(struct hotplug_slot *slot);
48 static int get_power_status(struct hotplug_slot *slot, u8 *value);
49 static int get_attention_status(struct hotplug_slot *slot, u8 *value);
50 static int get_latch_status(struct hotplug_slot *slot, u8 *value);
51 static int get_adapter_status(struct hotplug_slot *slot, u8 *value);
65 struct slot *slot; in init_slots() local
72 slot = kzalloc(sizeof(*slot), GFP_KERNEL); in init_slots()
73 if (!slot) { in init_slots()
78 hotplug_slot = &slot->hotplug_slot; in init_slots()
80 slot->hp_slot = i; in init_slots()
81 slot->ctrl = ctrl; in init_slots()
82 slot->bus = ctrl->pci_dev->subordinate->number; in init_slots()
83 slot->device = ctrl->slot_device_offset + i; in init_slots()
84 slot->hpc_ops = ctrl->hpc_ops; in init_slots()
85 slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i); in init_slots()
87 slot->wq = alloc_workqueue("shpchp-%d", 0, 0, slot->number); in init_slots()
88 if (!slot->wq) { in init_slots()
93 mutex_init(&slot->lock); in init_slots()
94 INIT_DELAYED_WORK(&slot->work, shpchp_queue_pushbutton_work); in init_slots()
97 snprintf(name, SLOT_NAME_SIZE, "%d", slot->number); in init_slots()
102 slot->bus, slot->device, slot->hp_slot, slot->number, in init_slots()
105 ctrl->pci_dev->subordinate, slot->device, name); in init_slots()
112 get_power_status(hotplug_slot, &slot->pwr_save); in init_slots()
113 get_attention_status(hotplug_slot, &slot->attention_save); in init_slots()
114 get_latch_status(hotplug_slot, &slot->latch_save); in init_slots()
115 get_adapter_status(hotplug_slot, &slot->presence_save); in init_slots()
117 list_add(&slot->slot_list, &ctrl->slot_list); in init_slots()
122 destroy_workqueue(slot->wq); in init_slots()
124 kfree(slot); in init_slots()
131 struct slot *slot, *next; in cleanup_slots() local
133 list_for_each_entry_safe(slot, next, &ctrl->slot_list, slot_list) { in cleanup_slots()
134 list_del(&slot->slot_list); in cleanup_slots()
135 cancel_delayed_work(&slot->work); in cleanup_slots()
136 destroy_workqueue(slot->wq); in cleanup_slots()
137 pci_hp_deregister(&slot->hotplug_slot); in cleanup_slots()
138 kfree(slot); in cleanup_slots()
147 struct slot *slot = get_slot(hotplug_slot); in set_attention_status() local
149 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in set_attention_status()
150 __func__, slot_name(slot)); in set_attention_status()
152 slot->attention_save = status; in set_attention_status()
153 slot->hpc_ops->set_attention_status(slot, status); in set_attention_status()
160 struct slot *slot = get_slot(hotplug_slot); in enable_slot() local
162 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in enable_slot()
163 __func__, slot_name(slot)); in enable_slot()
165 return shpchp_sysfs_enable_slot(slot); in enable_slot()
170 struct slot *slot = get_slot(hotplug_slot); in disable_slot() local
172 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in disable_slot()
173 __func__, slot_name(slot)); in disable_slot()
175 return shpchp_sysfs_disable_slot(slot); in disable_slot()
180 struct slot *slot = get_slot(hotplug_slot); in get_power_status() local
183 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_power_status()
184 __func__, slot_name(slot)); in get_power_status()
186 retval = slot->hpc_ops->get_power_status(slot, value); in get_power_status()
188 *value = slot->pwr_save; in get_power_status()
195 struct slot *slot = get_slot(hotplug_slot); in get_attention_status() local
198 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_attention_status()
199 __func__, slot_name(slot)); in get_attention_status()
201 retval = slot->hpc_ops->get_attention_status(slot, value); in get_attention_status()
203 *value = slot->attention_save; in get_attention_status()
210 struct slot *slot = get_slot(hotplug_slot); in get_latch_status() local
213 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_latch_status()
214 __func__, slot_name(slot)); in get_latch_status()
216 retval = slot->hpc_ops->get_latch_status(slot, value); in get_latch_status()
218 *value = slot->latch_save; in get_latch_status()
225 struct slot *slot = get_slot(hotplug_slot); in get_adapter_status() local
228 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_adapter_status()
229 __func__, slot_name(slot)); in get_adapter_status()
231 retval = slot->hpc_ops->get_adapter_status(slot, value); in get_adapter_status()
233 *value = slot->presence_save; in get_adapter_status()