Lines Matching refs:p_slot
58 struct slot *p_slot; in pciehp_handle_attention_button() local
71 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in pciehp_handle_attention_button()
73 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in pciehp_handle_attention_button()
74 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in pciehp_handle_attention_button()
87 if ((p_slot->state == BLINKINGON_STATE) in pciehp_handle_attention_button()
88 || (p_slot->state == BLINKINGOFF_STATE)) { in pciehp_handle_attention_button()
95 } else if ((p_slot->state == POWERON_STATE) in pciehp_handle_attention_button()
96 || (p_slot->state == POWEROFF_STATE)) { in pciehp_handle_attention_button()
114 struct slot *p_slot; in pciehp_handle_switch_change() local
133 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in pciehp_handle_switch_change()
134 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in pciehp_handle_switch_change()
135 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in pciehp_handle_switch_change()
161 struct slot *p_slot; in pciehp_handle_presence_change() local
179 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in pciehp_handle_presence_change()
184 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in pciehp_handle_presence_change()
207 struct slot *p_slot; in pciehp_handle_power_fault() local
225 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in pciehp_handle_power_fault()
227 if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) { in pciehp_handle_power_fault()
1099 struct slot *p_slot; in board_added() local
1102 p_slot = pciehp_find_slot(ctrl, func->device); in board_added()
1112 rc = p_slot->hpc_ops->power_on_slot(p_slot); in board_added()
1123 p_slot->hpc_ops->green_led_blink(p_slot); in board_added()
1139 rc = p_slot->hpc_ops->check_lnk_status(ctrl); in board_added()
1142 set_slot_off(ctrl, p_slot); in board_added()
1195 set_slot_off(ctrl, p_slot); in board_added()
1220 p_slot->hpc_ops->green_led_on(p_slot); in board_added()
1229 set_slot_off(ctrl, p_slot); in board_added()
1249 struct slot *p_slot; in remove_board() local
1260 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in remove_board()
1295 rc = p_slot->hpc_ops->power_off_slot(p_slot); in remove_board()
1305 p_slot->hpc_ops->green_led_off(p_slot); in remove_board()
1461 struct slot *p_slot; in interrupt_event_handler() local
1472 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in interrupt_event_handler()
1474 dbg("hp_slot %d, func %p, p_slot %p\n", hp_slot, func, p_slot); in interrupt_event_handler()
1478 del_timer(&p_slot->task_event); in interrupt_event_handler()
1480 switch (p_slot->state) { in interrupt_event_handler()
1485 p_slot->hpc_ops->green_led_on(p_slot); in interrupt_event_handler()
1489 p_slot->hpc_ops->set_attention_status(p_slot, 0); in interrupt_event_handler()
1501 p_slot->hpc_ops->green_led_off(p_slot); in interrupt_event_handler()
1505 p_slot->hpc_ops->set_attention_status(p_slot, 0); in interrupt_event_handler()
1517 info(msg_button_cancel, p_slot->number); in interrupt_event_handler()
1518 p_slot->state = STATIC_STATE; in interrupt_event_handler()
1524 p_slot->hpc_ops->get_power_status(p_slot, &getstatus); in interrupt_event_handler()
1528 p_slot->state = BLINKINGOFF_STATE; in interrupt_event_handler()
1529 info(msg_button_off, p_slot->number); in interrupt_event_handler()
1533 p_slot->state = BLINKINGON_STATE; in interrupt_event_handler()
1534 info(msg_button_on, p_slot->number); in interrupt_event_handler()
1541 p_slot->hpc_ops->green_led_blink(p_slot); in interrupt_event_handler()
1545 p_slot->hpc_ops->set_attention_status(p_slot, 0); in interrupt_event_handler()
1553 init_timer(&p_slot->task_event); in interrupt_event_handler()
1554 p_slot->task_event.expires = jiffies + 5 * HZ; /* 5 second delay */ in interrupt_event_handler()
1555 p_slot->task_event.function = (void (*)(unsigned long)) pushbutton_helper_thread; in interrupt_event_handler()
1556 p_slot->task_event.data = (unsigned long) p_slot; in interrupt_event_handler()
1558 dbg("add_timer p_slot = %p\n", (void *) p_slot); in interrupt_event_handler()
1559 add_timer(&p_slot->task_event); in interrupt_event_handler()
1567 p_slot->hpc_ops->set_attention_status(p_slot, 1); in interrupt_event_handler()
1570 p_slot->hpc_ops->green_led_off(p_slot); in interrupt_event_handler()
1577 if (p_slot) in interrupt_event_handler()
1578 update_slot_info(p_slot); in interrupt_event_handler()
1601 struct slot *p_slot = (struct slot *) slot; in pciehp_pushbutton_thread() local
1606 if (!p_slot) { in pciehp_pushbutton_thread()
1611 p_slot->hpc_ops->get_power_status(p_slot, &getstatus); in pciehp_pushbutton_thread()
1613 p_slot->state = POWEROFF_STATE; in pciehp_pushbutton_thread()
1614 dbg("In power_down_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device); in pciehp_pushbutton_thread()
1616 pciehp_disable_slot(p_slot); in pciehp_pushbutton_thread()
1617 p_slot->state = STATIC_STATE; in pciehp_pushbutton_thread()
1619 p_slot->state = POWERON_STATE; in pciehp_pushbutton_thread()
1620 dbg("In add_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device); in pciehp_pushbutton_thread()
1622 if (pciehp_enable_slot(p_slot)) { in pciehp_pushbutton_thread()
1624 down(&p_slot->ctrl->crit_sect); in pciehp_pushbutton_thread()
1626 p_slot->hpc_ops->green_led_off(p_slot); in pciehp_pushbutton_thread()
1629 wait_for_ctrl_irq (p_slot->ctrl); in pciehp_pushbutton_thread()
1632 up(&p_slot->ctrl->crit_sect); in pciehp_pushbutton_thread()
1634 p_slot->state = STATIC_STATE; in pciehp_pushbutton_thread()
1641 int pciehp_enable_slot (struct slot *p_slot) in pciehp_enable_slot() argument
1647 func = pciehp_slot_find(p_slot->bus, p_slot->device, 0); in pciehp_enable_slot()
1654 down(&p_slot->ctrl->crit_sect); in pciehp_enable_slot()
1655 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); in pciehp_enable_slot()
1657 info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number); in pciehp_enable_slot()
1658 up(&p_slot->ctrl->crit_sect); in pciehp_enable_slot()
1662 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in pciehp_enable_slot()
1664 info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number); in pciehp_enable_slot()
1665 up(&p_slot->ctrl->crit_sect); in pciehp_enable_slot()
1669 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); in pciehp_enable_slot()
1671 info("%s: already enabled on slot(%x)\n", __FUNCTION__, p_slot->number); in pciehp_enable_slot()
1672 up(&p_slot->ctrl->crit_sect); in pciehp_enable_slot()
1675 up(&p_slot->ctrl->crit_sect); in pciehp_enable_slot()
1679 func = pciehp_slot_create(p_slot->bus); in pciehp_enable_slot()
1683 func->bus = p_slot->bus; in pciehp_enable_slot()
1684 func->device = p_slot->device; in pciehp_enable_slot()
1690 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in pciehp_enable_slot()
1691 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in pciehp_enable_slot()
1694 rc = board_added(func, p_slot->ctrl); in pciehp_enable_slot()
1702 func = pciehp_slot_create(p_slot->bus); in pciehp_enable_slot()
1706 func->bus = p_slot->bus; in pciehp_enable_slot()
1707 func->device = p_slot->device; in pciehp_enable_slot()
1713 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in pciehp_enable_slot()
1714 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in pciehp_enable_slot()
1718 if (p_slot) in pciehp_enable_slot()
1719 update_slot_info(p_slot); in pciehp_enable_slot()
1725 int pciehp_disable_slot (struct slot *p_slot) in pciehp_disable_slot() argument
1733 struct pci_bus *pci_bus = p_slot->ctrl->pci_dev->subordinate; in pciehp_disable_slot()
1736 if (!p_slot->ctrl) in pciehp_disable_slot()
1740 down(&p_slot->ctrl->crit_sect); in pciehp_disable_slot()
1742 ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); in pciehp_disable_slot()
1744 info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number); in pciehp_disable_slot()
1745 up(&p_slot->ctrl->crit_sect); in pciehp_disable_slot()
1749 ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in pciehp_disable_slot()
1751 info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number); in pciehp_disable_slot()
1752 up(&p_slot->ctrl->crit_sect); in pciehp_disable_slot()
1756 ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); in pciehp_disable_slot()
1758 info("%s: already disabled slot(%x)\n", __FUNCTION__, p_slot->number); in pciehp_disable_slot()
1759 up(&p_slot->ctrl->crit_sect); in pciehp_disable_slot()
1762 up(&p_slot->ctrl->crit_sect); in pciehp_disable_slot()
1764 func = pciehp_slot_find(p_slot->bus, p_slot->device, index++); in pciehp_disable_slot()
1800 func = pciehp_slot_find(p_slot->bus, p_slot->device, index++); in pciehp_disable_slot()
1803 func = pciehp_slot_find(p_slot->bus, p_slot->device, 0); in pciehp_disable_slot()
1805 rc = remove_board(func, p_slot->ctrl); in pciehp_disable_slot()
1809 if (p_slot) in pciehp_disable_slot()
1810 update_slot_info(p_slot); in pciehp_disable_slot()