Lines Matching refs:ctrl
81 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in release_slot()
89 static int init_slot(struct controller *ctrl) in init_slot() argument
91 struct slot *slot = ctrl->slot; in init_slot()
114 if (MRL_SENS(ctrl)) in init_slot()
116 if (ATTN_LED(ctrl)) { in init_slot()
127 snprintf(name, SLOT_NAME_SIZE, "%u", PSN(ctrl)); in init_slot()
129 ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n", in init_slot()
130 pci_domain_nr(ctrl->pcie->port->subordinate), in init_slot()
131 ctrl->pcie->port->subordinate->number, PSN(ctrl)); in init_slot()
133 ctrl->pcie->port->subordinate, 0, name); in init_slot()
135 ctrl_err(ctrl, in init_slot()
146 static void cleanup_slot(struct controller *ctrl) in cleanup_slot() argument
148 pci_hp_deregister(ctrl->slot->hotplug_slot); in cleanup_slot()
158 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in set_attention_status()
169 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in enable_slot()
180 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in disable_slot()
190 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_power_status()
200 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_attention_status()
210 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_latch_status()
220 ctrl_dbg(slot->ctrl, "%s: physical_slot = %s\n", in get_adapter_status()
229 struct controller *ctrl; in pciehp_probe() local
240 ctrl = pcie_init(dev); in pciehp_probe()
241 if (!ctrl) { in pciehp_probe()
245 set_service_data(dev, ctrl); in pciehp_probe()
248 rc = init_slot(ctrl); in pciehp_probe()
251 ctrl_warn(ctrl, "Slot already registered by another " in pciehp_probe()
254 ctrl_err(ctrl, "Slot initialization failed\n"); in pciehp_probe()
259 rc = pcie_init_notification(ctrl); in pciehp_probe()
261 ctrl_err(ctrl, "Notification initialization failed\n"); in pciehp_probe()
266 slot = ctrl->slot; in pciehp_probe()
272 if (!occupied && poweron && POWER_CTRL(ctrl)) in pciehp_probe()
278 cleanup_slot(ctrl); in pciehp_probe()
280 pciehp_release_ctrl(ctrl); in pciehp_probe()
287 struct controller *ctrl = get_service_data(dev); in pciehp_remove() local
289 cleanup_slot(ctrl); in pciehp_remove()
290 pciehp_release_ctrl(ctrl); in pciehp_remove()
301 struct controller *ctrl; in pciehp_resume() local
305 ctrl = get_service_data(dev); in pciehp_resume()
308 pcie_enable_notification(ctrl); in pciehp_resume()
310 slot = ctrl->slot; in pciehp_resume()