• Home
  • Raw
  • Download

Lines Matching refs:slot

46 static int set_attention_status(struct hotplug_slot *slot, u8 value);
47 static int enable_slot(struct hotplug_slot *slot);
48 static int disable_slot(struct hotplug_slot *slot);
49 static int get_power_status(struct hotplug_slot *slot, u8 *value);
50 static int get_attention_status(struct hotplug_slot *slot, u8 *value);
51 static int get_latch_status(struct hotplug_slot *slot, u8 *value);
52 static int get_adapter_status(struct hotplug_slot *slot, u8 *value);
66 struct slot *slot; in init_slots() local
73 slot = kzalloc(sizeof(*slot), GFP_KERNEL); in init_slots()
74 if (!slot) { in init_slots()
79 hotplug_slot = &slot->hotplug_slot; in init_slots()
81 slot->hp_slot = i; in init_slots()
82 slot->ctrl = ctrl; in init_slots()
83 slot->bus = ctrl->pci_dev->subordinate->number; in init_slots()
84 slot->device = ctrl->slot_device_offset + i; in init_slots()
85 slot->hpc_ops = ctrl->hpc_ops; in init_slots()
86 slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i); in init_slots()
88 slot->wq = alloc_workqueue("shpchp-%d", 0, 0, slot->number); in init_slots()
89 if (!slot->wq) { in init_slots()
94 mutex_init(&slot->lock); in init_slots()
95 INIT_DELAYED_WORK(&slot->work, shpchp_queue_pushbutton_work); in init_slots()
98 snprintf(name, SLOT_NAME_SIZE, "%d", slot->number); in init_slots()
103 slot->bus, slot->device, slot->hp_slot, slot->number, in init_slots()
106 ctrl->pci_dev->subordinate, slot->device, name); in init_slots()
113 get_power_status(hotplug_slot, &slot->pwr_save); in init_slots()
114 get_attention_status(hotplug_slot, &slot->attention_save); in init_slots()
115 get_latch_status(hotplug_slot, &slot->latch_save); in init_slots()
116 get_adapter_status(hotplug_slot, &slot->presence_save); in init_slots()
118 list_add(&slot->slot_list, &ctrl->slot_list); in init_slots()
123 destroy_workqueue(slot->wq); in init_slots()
125 kfree(slot); in init_slots()
132 struct slot *slot, *next; in cleanup_slots() local
134 list_for_each_entry_safe(slot, next, &ctrl->slot_list, slot_list) { in cleanup_slots()
135 list_del(&slot->slot_list); in cleanup_slots()
136 cancel_delayed_work(&slot->work); in cleanup_slots()
137 destroy_workqueue(slot->wq); in cleanup_slots()
138 pci_hp_deregister(&slot->hotplug_slot); in cleanup_slots()
139 kfree(slot); in cleanup_slots()
148 struct slot *slot = get_slot(hotplug_slot); in set_attention_status() local
150 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in set_attention_status()
151 __func__, slot_name(slot)); in set_attention_status()
153 slot->attention_save = status; in set_attention_status()
154 slot->hpc_ops->set_attention_status(slot, status); in set_attention_status()
161 struct slot *slot = get_slot(hotplug_slot); in enable_slot() local
163 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in enable_slot()
164 __func__, slot_name(slot)); in enable_slot()
166 return shpchp_sysfs_enable_slot(slot); in enable_slot()
171 struct slot *slot = get_slot(hotplug_slot); in disable_slot() local
173 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in disable_slot()
174 __func__, slot_name(slot)); in disable_slot()
176 return shpchp_sysfs_disable_slot(slot); in disable_slot()
181 struct slot *slot = get_slot(hotplug_slot); in get_power_status() local
184 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_power_status()
185 __func__, slot_name(slot)); in get_power_status()
187 retval = slot->hpc_ops->get_power_status(slot, value); in get_power_status()
189 *value = slot->pwr_save; in get_power_status()
196 struct slot *slot = get_slot(hotplug_slot); in get_attention_status() local
199 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_attention_status()
200 __func__, slot_name(slot)); in get_attention_status()
202 retval = slot->hpc_ops->get_attention_status(slot, value); in get_attention_status()
204 *value = slot->attention_save; in get_attention_status()
211 struct slot *slot = get_slot(hotplug_slot); in get_latch_status() local
214 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_latch_status()
215 __func__, slot_name(slot)); in get_latch_status()
217 retval = slot->hpc_ops->get_latch_status(slot, value); in get_latch_status()
219 *value = slot->latch_save; in get_latch_status()
226 struct slot *slot = get_slot(hotplug_slot); in get_adapter_status() local
229 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_adapter_status()
230 __func__, slot_name(slot)); in get_adapter_status()
232 retval = slot->hpc_ops->get_adapter_status(slot, value); in get_adapter_status()
234 *value = slot->presence_save; in get_adapter_status()