Lines Matching refs:p_slot
61 struct slot *p_slot; in shpchp_handle_attention_button() local
74 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in shpchp_handle_attention_button()
76 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in shpchp_handle_attention_button()
77 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in shpchp_handle_attention_button()
90 if ((p_slot->state == BLINKINGON_STATE) in shpchp_handle_attention_button()
91 || (p_slot->state == BLINKINGOFF_STATE)) { in shpchp_handle_attention_button()
98 } else if ((p_slot->state == POWERON_STATE) in shpchp_handle_attention_button()
99 || (p_slot->state == POWEROFF_STATE)) { in shpchp_handle_attention_button()
118 struct slot *p_slot; in shpchp_handle_switch_change() local
137 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in shpchp_handle_switch_change()
138 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in shpchp_handle_switch_change()
139 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in shpchp_handle_switch_change()
172 struct slot *p_slot; in shpchp_handle_presence_change() local
190 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in shpchp_handle_presence_change()
195 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in shpchp_handle_presence_change()
219 struct slot *p_slot; in shpchp_handle_power_fault() local
237 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in shpchp_handle_power_fault()
239 if ( !(p_slot->hpc_ops->query_power_fault(p_slot))) { in shpchp_handle_power_fault()
1073 struct slot *p_slot, *pslot; in board_added() local
1078 p_slot = shpchp_find_slot(ctrl, func->device); in board_added()
1088 rc = p_slot->hpc_ops->power_on_slot(p_slot); in board_added()
1099 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1107 rc = p_slot->hpc_ops->get_adapter_speed(p_slot, &adapter_speed); in board_added()
1121 rc = p_slot->hpc_ops->get_cur_bus_speed(p_slot, &bus_speed); in board_added()
1129 rc = p_slot->hpc_ops->get_max_bus_speed(p_slot, &max_bus_speed); in board_added()
1138 rc = p_slot->hpc_ops->get_prog_int(p_slot, &pi); in board_added()
1162 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, max_bus_speed); in board_added()
1173 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1189 rc = p_slot->hpc_ops->get_mode1_ECC_cap(p_slot, &mode); in board_added()
1209 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, max_bus_speed); in board_added()
1220 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1244 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, max_bus_speed); in board_added()
1255 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1272 rc = p_slot->hpc_ops->get_mode1_ECC_cap(p_slot, &mode); in board_added()
1292 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, max_bus_speed); in board_added()
1303 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1327 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, max_bus_speed); in board_added()
1338 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1363 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, max_bus_speed); in board_added()
1374 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1420 rc = p_slot->hpc_ops->get_max_bus_speed(p_slot, &max_bus_speed); in board_added()
1437 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, adapter_speed); in board_added()
1447 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1465 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, adapter_speed); in board_added()
1467 rc = p_slot->hpc_ops->set_bus_speed_mode(p_slot, max_bus_speed); in board_added()
1479 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1499 rc = p_slot->hpc_ops->slot_enable(p_slot); in board_added()
1510 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1575 retval = p_slot->hpc_ops->slot_disable(p_slot); in board_added()
1585 retval = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1620 p_slot->hpc_ops->green_led_on(p_slot); in board_added()
1634 rc = p_slot->hpc_ops->slot_disable(p_slot); in board_added()
1644 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in board_added()
1674 struct slot *p_slot; in remove_board() local
1685 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in remove_board()
1719 rc = p_slot->hpc_ops->slot_disable(p_slot); in remove_board()
1729 rc = p_slot->hpc_ops->check_cmd_status(ctrl); in remove_board()
1737 rc = p_slot->hpc_ops->set_attention_status(p_slot, 0); in remove_board()
1902 struct slot *p_slot; in interrupt_event_handler() local
1916 p_slot = shpchp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); in interrupt_event_handler()
1918 dbg("%s:hp_slot %d, func %p, p_slot %p\n", __FUNCTION__,hp_slot, func, p_slot); in interrupt_event_handler()
1922 del_timer(&p_slot->task_event); in interrupt_event_handler()
1924 switch (p_slot->state) { in interrupt_event_handler()
1929 p_slot->hpc_ops->green_led_on(p_slot); in interrupt_event_handler()
1933 p_slot->hpc_ops->set_attention_status(p_slot, 0); in interrupt_event_handler()
1945 p_slot->hpc_ops->green_led_off(p_slot); in interrupt_event_handler()
1949 p_slot->hpc_ops->set_attention_status(p_slot, 0); in interrupt_event_handler()
1961 info(msg_button_cancel, p_slot->number); in interrupt_event_handler()
1962 p_slot->state = STATIC_STATE; in interrupt_event_handler()
1968 p_slot->hpc_ops->get_power_status(p_slot, &getstatus); in interrupt_event_handler()
1972 p_slot->state = BLINKINGOFF_STATE; in interrupt_event_handler()
1973 info(msg_button_off, p_slot->number); in interrupt_event_handler()
1977 p_slot->state = BLINKINGON_STATE; in interrupt_event_handler()
1978 info(msg_button_on, p_slot->number); in interrupt_event_handler()
1985 p_slot->hpc_ops->green_led_blink(p_slot); in interrupt_event_handler()
1989 p_slot->hpc_ops->set_attention_status(p_slot, 0); in interrupt_event_handler()
1997 init_timer(&p_slot->task_event); in interrupt_event_handler()
1998 p_slot->task_event.expires = jiffies + 5 * HZ; /* 5 second delay */ in interrupt_event_handler()
1999 p_slot->task_event.function = (void (*)(unsigned long)) pushbutton_helper_thread; in interrupt_event_handler()
2000 p_slot->task_event.data = (unsigned long) p_slot; in interrupt_event_handler()
2002 dbg("%s: add_timer p_slot = %p\n", __FUNCTION__, (void *) p_slot); in interrupt_event_handler()
2003 add_timer(&p_slot->task_event); in interrupt_event_handler()
2011 p_slot->hpc_ops->set_attention_status(p_slot, 1); in interrupt_event_handler()
2016 p_slot->hpc_ops->green_led_off(p_slot); in interrupt_event_handler()
2025 if (p_slot) in interrupt_event_handler()
2026 update_slot_info(p_slot); in interrupt_event_handler()
2049 struct slot *p_slot = (struct slot *) slot; in shpchp_pushbutton_thread() local
2054 if (!p_slot) { in shpchp_pushbutton_thread()
2059 p_slot->hpc_ops->get_power_status(p_slot, &getstatus); in shpchp_pushbutton_thread()
2061 p_slot->state = POWEROFF_STATE; in shpchp_pushbutton_thread()
2062 dbg("In power_down_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device); in shpchp_pushbutton_thread()
2064 shpchp_disable_slot(p_slot); in shpchp_pushbutton_thread()
2065 p_slot->state = STATIC_STATE; in shpchp_pushbutton_thread()
2067 p_slot->state = POWERON_STATE; in shpchp_pushbutton_thread()
2068 dbg("In add_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device); in shpchp_pushbutton_thread()
2070 if (shpchp_enable_slot(p_slot)) { in shpchp_pushbutton_thread()
2072 down(&p_slot->ctrl->crit_sect); in shpchp_pushbutton_thread()
2074 p_slot->hpc_ops->green_led_off(p_slot); in shpchp_pushbutton_thread()
2077 wait_for_ctrl_irq(p_slot->ctrl); in shpchp_pushbutton_thread()
2080 up(&p_slot->ctrl->crit_sect); in shpchp_pushbutton_thread()
2082 p_slot->state = STATIC_STATE; in shpchp_pushbutton_thread()
2089 int shpchp_enable_slot (struct slot *p_slot) in shpchp_enable_slot() argument
2095 func = shpchp_slot_find(p_slot->bus, p_slot->device, 0); in shpchp_enable_slot()
2102 down(&p_slot->ctrl->crit_sect); in shpchp_enable_slot()
2103 rc = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); in shpchp_enable_slot()
2105 info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number); in shpchp_enable_slot()
2106 up(&p_slot->ctrl->crit_sect); in shpchp_enable_slot()
2109 rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in shpchp_enable_slot()
2111 info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number); in shpchp_enable_slot()
2112 up(&p_slot->ctrl->crit_sect); in shpchp_enable_slot()
2115 rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); in shpchp_enable_slot()
2117 info("%s: already enabled on slot(%x)\n", __FUNCTION__, p_slot->number); in shpchp_enable_slot()
2118 up(&p_slot->ctrl->crit_sect); in shpchp_enable_slot()
2121 up(&p_slot->ctrl->crit_sect); in shpchp_enable_slot()
2125 func = shpchp_slot_create(p_slot->bus); in shpchp_enable_slot()
2129 func->bus = p_slot->bus; in shpchp_enable_slot()
2130 func->device = p_slot->device; in shpchp_enable_slot()
2136 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in shpchp_enable_slot()
2137 p_slot->hpc_ops->get_power_status(p_slot, &(func->pwr_save)); in shpchp_enable_slot()
2139 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in shpchp_enable_slot()
2142 rc = board_added(func, p_slot->ctrl); in shpchp_enable_slot()
2150 func = shpchp_slot_create(p_slot->bus); in shpchp_enable_slot()
2154 func->bus = p_slot->bus; in shpchp_enable_slot()
2155 func->device = p_slot->device; in shpchp_enable_slot()
2161 p_slot->hpc_ops->get_adapter_status(p_slot, &(func->presence_save)); in shpchp_enable_slot()
2162 p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in shpchp_enable_slot()
2166 if (p_slot) in shpchp_enable_slot()
2167 update_slot_info(p_slot); in shpchp_enable_slot()
2173 int shpchp_disable_slot (struct slot *p_slot) in shpchp_disable_slot() argument
2181 struct pci_bus *pci_bus = p_slot->ctrl->pci_dev->subordinate; in shpchp_disable_slot()
2184 if (!p_slot->ctrl) in shpchp_disable_slot()
2188 down(&p_slot->ctrl->crit_sect); in shpchp_disable_slot()
2190 ret = p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); in shpchp_disable_slot()
2192 info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number); in shpchp_disable_slot()
2193 up(&p_slot->ctrl->crit_sect); in shpchp_disable_slot()
2196 ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus); in shpchp_disable_slot()
2198 info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number); in shpchp_disable_slot()
2199 up(&p_slot->ctrl->crit_sect); in shpchp_disable_slot()
2202 ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus); in shpchp_disable_slot()
2204 info("%s: already disabled slot(%x)\n", __FUNCTION__, p_slot->number); in shpchp_disable_slot()
2205 up(&p_slot->ctrl->crit_sect); in shpchp_disable_slot()
2208 up(&p_slot->ctrl->crit_sect); in shpchp_disable_slot()
2210 func = shpchp_slot_find(p_slot->bus, p_slot->device, index++); in shpchp_disable_slot()
2246 func = shpchp_slot_find(p_slot->bus, p_slot->device, index++); in shpchp_disable_slot()
2249 func = shpchp_slot_find(p_slot->bus, p_slot->device, 0); in shpchp_disable_slot()
2251 rc = remove_board(func, p_slot->ctrl); in shpchp_disable_slot()
2255 if (p_slot) in shpchp_disable_slot()
2256 update_slot_info(p_slot); in shpchp_disable_slot()