• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/pci/hotplug/

Lines Matching refs:slot

66 static int enable_slot(struct hotplug_slot *slot);
67 static int disable_slot(struct hotplug_slot *slot);
68 static int set_attention_status(struct hotplug_slot *slot, u8 value);
69 static int get_power_status(struct hotplug_slot *slot, u8 * value);
70 static int get_attention_status(struct hotplug_slot *slot, u8 * value);
71 static int get_adapter_status(struct hotplug_slot *slot, u8 * value);
72 static int get_latch_status(struct hotplug_slot *slot, u8 * value);
108 struct slot *slot = hotplug_slot->private;
114 retval = controller->ops->set_power(slot, 1);
121 struct slot *slot = hotplug_slot->private;
129 dbg("%s - unconfiguring slot %s",
130 __FUNCTION__, slot->hotplug_slot->name);
131 if ((retval = cpci_unconfigure_slot(slot))) {
132 err("%s - could not unconfigure slot %s",
133 __FUNCTION__, slot->hotplug_slot->name);
136 dbg("%s - finished unconfiguring slot %s",
137 __FUNCTION__, slot->hotplug_slot->name);
140 if (cpci_clear_ext(slot)) {
141 err("%s - could not clear EXT for slot %s",
142 __FUNCTION__, slot->hotplug_slot->name);
146 cpci_led_on(slot);
149 if ((retval = controller->ops->set_power(slot, 0)))
152 if (update_adapter_status(slot->hotplug_slot, 0))
155 if (slot->extracting) {
156 slot->extracting = 0;
165 cpci_get_power_status(struct slot *slot)
170 power = controller->ops->get_power(slot);
177 struct slot *slot = hotplug_slot->private;
179 *value = cpci_get_power_status(slot);
186 struct slot *slot = hotplug_slot->private;
188 *value = cpci_get_attention_status(slot);
214 struct slot *slot = hotplug_slot->private;
216 kfree(slot->hotplug_slot->info);
217 kfree(slot->hotplug_slot->name);
218 kfree(slot->hotplug_slot);
219 if (slot->dev)
220 pci_dev_put(slot->dev);
221 kfree(slot);
226 make_slot_name(struct slot *slot)
228 snprintf(slot->hotplug_slot->name,
229 SLOT_NAME_SIZE, "%02x:%02x", slot->bus->number, slot->number);
235 struct slot *slot;
246 * Create a structure for each slot, and register that slot
250 slot = kzalloc(sizeof (struct slot), GFP_KERNEL);
251 if (!slot)
258 slot->hotplug_slot = hotplug_slot;
270 slot->bus = bus;
271 slot->number = i;
272 slot->devfn = PCI_DEVFN(i, 0);
274 hotplug_slot->private = slot;
276 make_slot_name(slot);
280 * Initialize the slot info structure with some known
283 dbg("initializing slot %s", slot->hotplug_slot->name);
284 info->power_status = cpci_get_power_status(slot);
285 info->attention_status = cpci_get_attention_status(slot);
287 dbg("registering slot %s", slot->hotplug_slot->name);
288 status = pci_hp_register(slot->hotplug_slot);
294 /* Add slot to our internal list */
296 list_add(&slot->slot_list, &slot_list);
308 kfree(slot);
316 struct slot *slot;
317 struct slot *tmp;
325 list_for_each_entry_safe(slot, tmp, &slot_list, slot_list) {
326 if (slot->bus == bus) {
327 list_del(&slot->slot_list);
330 dbg("deregistering slot %s", slot->hotplug_slot->name);
331 status = pci_hp_deregister(slot->hotplug_slot);
374 struct slot *slot;
383 list_for_each_entry(slot, &slot_list, slot_list) {
384 dbg("%s - looking at slot %s",
385 __FUNCTION__, slot->hotplug_slot->name);
386 if (clear_ins && cpci_check_and_clear_ins(slot))
387 dbg("%s - cleared INS for slot %s",
388 __FUNCTION__, slot->hotplug_slot->name);
389 dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0));
391 if (update_adapter_status(slot->hotplug_slot, 1))
393 if (update_latch_status(slot->hotplug_slot, 1))
395 slot->dev = dev;
406 struct slot *slot;
418 list_for_each_entry(slot, &slot_list, slot_list) {
419 dbg("%s - looking at slot %s",
420 __FUNCTION__, slot->hotplug_slot->name);
421 if (cpci_check_and_clear_ins(slot)) {
426 if (slot->dev) {
427 warn("slot %s already inserted",
428 slot->hotplug_slot->name);
434 dbg("%s - slot %s inserted",
435 __FUNCTION__, slot->hotplug_slot->name);
438 hs_csr = cpci_get_hs_csr(slot);
439 dbg("%s - slot %s HS_CSR (1) = %04x",
440 __FUNCTION__, slot->hotplug_slot->name, hs_csr);
443 dbg("%s - configuring slot %s",
444 __FUNCTION__, slot->hotplug_slot->name);
445 if (cpci_configure_slot(slot)) {
446 err("%s - could not configure slot %s",
447 __FUNCTION__, slot->hotplug_slot->name);
450 dbg("%s - finished configuring slot %s",
451 __FUNCTION__, slot->hotplug_slot->name);
454 hs_csr = cpci_get_hs_csr(slot);
455 dbg("%s - slot %s HS_CSR (2) = %04x",
456 __FUNCTION__, slot->hotplug_slot->name, hs_csr);
458 if (update_latch_status(slot->hotplug_slot, 1))
461 if (update_adapter_status(slot->hotplug_slot, 1))
464 cpci_led_off(slot);
467 hs_csr = cpci_get_hs_csr(slot);
468 dbg("%s - slot %s HS_CSR (3) = %04x",
469 __FUNCTION__, slot->hotplug_slot->name, hs_csr);
472 } else if (cpci_check_ext(slot)) {
474 dbg("%s - slot %s extracted",
475 __FUNCTION__, slot->hotplug_slot->name);
478 hs_csr = cpci_get_hs_csr(slot);
479 dbg("%s - slot %s HS_CSR = %04x",
480 __FUNCTION__, slot->hotplug_slot->name, hs_csr);
482 if (!slot->extracting) {
483 if (update_latch_status(slot->hotplug_slot, 0)) {
486 slot->extracting = 1;
490 } else if (slot->extracting) {
491 hs_csr = cpci_get_hs_csr(slot);
497 err("card in slot %s was improperly removed",
498 slot->hotplug_slot->name);
499 if (update_adapter_status(slot->hotplug_slot, 0))
501 slot->extracting = 0;
658 struct slot *slot;
659 struct slot *tmp;
668 list_for_each_entry_safe(slot, tmp, &slot_list, slot_list) {
669 list_del(&slot->slot_list);
670 pci_hp_deregister(slot->hotplug_slot);