Lines Matching refs:hotplug_slot

69 static int set_attention_status (struct hotplug_slot *slot, u8 value);
70 static int enable_slot (struct hotplug_slot *slot);
71 static int disable_slot (struct hotplug_slot *slot);
72 static int hardware_test (struct hotplug_slot *slot, u32 value);
73 static int get_power_status (struct hotplug_slot *slot, u8 *value);
74 static int get_attention_status (struct hotplug_slot *slot, u8 *value);
75 static int get_latch_status (struct hotplug_slot *slot, u8 *value);
76 static int get_adapter_status (struct hotplug_slot *slot, u8 *value);
77 static int get_max_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value);
78 static int get_cur_bus_speed (struct hotplug_slot *slot, enum pci_bus_speed *value);
114 new_slot->hotplug_slot = kmalloc (sizeof (struct hotplug_slot), GFP_KERNEL); in init_slots()
115 if (!new_slot->hotplug_slot) { in init_slots()
119 memset(new_slot->hotplug_slot, 0, sizeof (struct hotplug_slot)); in init_slots()
121 new_slot->hotplug_slot->info = kmalloc (sizeof (struct hotplug_slot_info), GFP_KERNEL); in init_slots()
122 if (!new_slot->hotplug_slot->info) { in init_slots()
123 kfree (new_slot->hotplug_slot); in init_slots()
127 memset(new_slot->hotplug_slot->info, 0, sizeof (struct hotplug_slot_info)); in init_slots()
128 new_slot->hotplug_slot->name = kmalloc (SLOT_NAME_SIZE, GFP_KERNEL); in init_slots()
129 if (!new_slot->hotplug_slot->name) { in init_slots()
130 kfree (new_slot->hotplug_slot->info); in init_slots()
131 kfree (new_slot->hotplug_slot); in init_slots()
143 kfree (new_slot->hotplug_slot->info); in init_slots()
144 kfree (new_slot->hotplug_slot); in init_slots()
153 new_slot->hotplug_slot->private = new_slot; in init_slots()
154 make_slot_name (new_slot->hotplug_slot->name, SLOT_NAME_SIZE, new_slot); in init_slots()
155 new_slot->hotplug_slot->ops = &shpchp_hotplug_slot_ops; in init_slots()
157 new_slot->hpc_ops->get_power_status(new_slot, &(new_slot->hotplug_slot->info->power_status)); in init_slots()
158 …new_slot->hpc_ops->get_attention_status(new_slot, &(new_slot->hotplug_slot->info->attention_status… in init_slots()
159 new_slot->hpc_ops->get_latch_status(new_slot, &(new_slot->hotplug_slot->info->latch_status)); in init_slots()
160 new_slot->hpc_ops->get_adapter_status(new_slot, &(new_slot->hotplug_slot->info->adapter_status)); in init_slots()
163 result = pci_hp_register (new_slot->hotplug_slot); in init_slots()
166 kfree (new_slot->hotplug_slot->info); in init_slots()
167 kfree (new_slot->hotplug_slot->name); in init_slots()
168 kfree (new_slot->hotplug_slot); in init_slots()
194 pci_hp_deregister (old_slot->hotplug_slot); in cleanup_slots()
195 kfree(old_slot->hotplug_slot->info); in cleanup_slots()
196 kfree(old_slot->hotplug_slot->name); in cleanup_slots()
197 kfree(old_slot->hotplug_slot); in cleanup_slots()
238 static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status) in set_attention_status() argument
240 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in set_attention_status()
245 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in set_attention_status()
247 hotplug_slot->info->attention_status = status; in set_attention_status()
255 static int enable_slot (struct hotplug_slot *hotplug_slot) in enable_slot() argument
257 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in enable_slot()
262 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in enable_slot()
268 static int disable_slot (struct hotplug_slot *hotplug_slot) in disable_slot() argument
270 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in disable_slot()
275 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in disable_slot()
281 static int hardware_test (struct hotplug_slot *hotplug_slot, u32 value) in hardware_test() argument
287 static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value) in get_power_status() argument
289 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in get_power_status()
295 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_power_status()
299 *value = hotplug_slot->info->power_status; in get_power_status()
304 static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value) in get_attention_status() argument
306 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in get_attention_status()
312 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_attention_status()
316 *value = hotplug_slot->info->attention_status; in get_attention_status()
321 static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value) in get_latch_status() argument
323 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in get_latch_status()
329 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_latch_status()
333 *value = hotplug_slot->info->latch_status; in get_latch_status()
338 static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value) in get_adapter_status() argument
340 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in get_adapter_status()
346 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_adapter_status()
351 *value = hotplug_slot->info->adapter_status; in get_adapter_status()
356 static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value) in get_max_bus_speed() argument
358 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in get_max_bus_speed()
364 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_max_bus_speed()
373 static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value) in get_cur_bus_speed() argument
375 struct slot *slot = get_slot (hotplug_slot, __FUNCTION__); in get_cur_bus_speed()
381 dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); in get_cur_bus_speed()