Lines Matching refs:ctrl

60 static int init_slots(struct controller *ctrl)  in init_slots()  argument
68 for (i = 0; i < ctrl->num_slots; i++) { in init_slots()
78 slot->ctrl = ctrl; in init_slots()
79 slot->bus = ctrl->pci_dev->subordinate->number; in init_slots()
80 slot->device = ctrl->slot_device_offset + i; in init_slots()
81 slot->number = ctrl->first_slot + (ctrl->slot_num_inc * i); in init_slots()
96 …ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x hp_slot=%x sun=%x slot_device_offset=%x\… in init_slots()
97 pci_domain_nr(ctrl->pci_dev->subordinate), in init_slots()
99 ctrl->slot_device_offset); in init_slots()
101 ctrl->pci_dev->subordinate, slot->device, name); in init_slots()
103 ctrl_err(ctrl, "pci_hp_register failed with error %d\n", in init_slots()
113 list_add(&slot->slot_list, &ctrl->slot_list); in init_slots()
125 void cleanup_slots(struct controller *ctrl) in cleanup_slots() argument
129 list_for_each_entry_safe(slot, next, &ctrl->slot_list, slot_list) { in cleanup_slots()
145 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in set_attention_status()
158 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in enable_slot()
168 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in disable_slot()
179 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_power_status()
194 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_attention_status()
209 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_latch_status()
224 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_adapter_status()
253 struct controller *ctrl; in shpc_probe() local
261 ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL); in shpc_probe()
262 if (!ctrl) in shpc_probe()
265 INIT_LIST_HEAD(&ctrl->slot_list); in shpc_probe()
267 rc = shpc_init(ctrl, pdev); in shpc_probe()
269 ctrl_dbg(ctrl, "Controller initialization failed\n"); in shpc_probe()
273 pci_set_drvdata(pdev, ctrl); in shpc_probe()
276 rc = init_slots(ctrl); in shpc_probe()
278 ctrl_err(ctrl, "Slot initialization failed\n"); in shpc_probe()
282 rc = shpchp_create_ctrl_files(ctrl); in shpc_probe()
290 cleanup_slots(ctrl); in shpc_probe()
292 shpchp_release_ctlr(ctrl); in shpc_probe()
294 kfree(ctrl); in shpc_probe()
301 struct controller *ctrl = pci_get_drvdata(dev); in shpc_remove() local
304 shpchp_remove_ctrl_files(ctrl); in shpc_remove()
305 shpchp_release_ctlr(ctrl); in shpc_remove()
306 kfree(ctrl); in shpc_remove()