Lines Matching refs:vha
38 qlafx00_mailbox_command(scsi_qla_host_t *vha, struct mbx_cmd_32 *mcp) in qlafx00_mailbox_command() argument
52 struct qla_hw_data *ha = vha->hw; in qlafx00_mailbox_command()
56 ql_log(ql_log_warn, vha, 0x115c, in qlafx00_mailbox_command()
62 if (vha->device_flags & DFLG_DEV_FAILED) { in qlafx00_mailbox_command()
63 ql_log(ql_log_warn, vha, 0x115f, in qlafx00_mailbox_command()
75 ql_log(ql_log_warn, vha, 0x1175, in qlafx00_mailbox_command()
83 ql_log(ql_log_warn, vha, 0x1176, in qlafx00_mailbox_command()
96 ql_log(ql_log_warn, vha, 0x1177, in qlafx00_mailbox_command()
106 ql_dbg(ql_dbg_mbx, vha, 0x1178, in qlafx00_mailbox_command()
131 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1172, in qlafx00_mailbox_command()
133 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1173, in qlafx00_mailbox_command()
135 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1174, in qlafx00_mailbox_command()
139 ql_dbg(ql_dbg_mbx, vha, 0x1179, in qlafx00_mailbox_command()
152 ql_dbg(ql_dbg_mbx, vha, 0x112c, in qlafx00_mailbox_command()
171 ql_dbg(ql_dbg_mbx, vha, 0x112d, in qlafx00_mailbox_command()
180 ql_dbg(ql_dbg_mbx, vha, 0x112e, in qlafx00_mailbox_command()
213 ql_dbg(ql_dbg_mbx, vha, 0x113a, in qlafx00_mailbox_command()
225 ql_dbg(ql_dbg_mbx, vha, 0x115d, in qlafx00_mailbox_command()
228 if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && in qlafx00_mailbox_command()
229 !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) && in qlafx00_mailbox_command()
230 !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { in qlafx00_mailbox_command()
237 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_mailbox_command()
238 qla2xxx_wake_dpc(vha); in qlafx00_mailbox_command()
242 ql_dbg(ql_dbg_mbx, vha, 0x1160, in qlafx00_mailbox_command()
245 if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && in qlafx00_mailbox_command()
246 !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) && in qlafx00_mailbox_command()
247 !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { in qlafx00_mailbox_command()
254 set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); in qlafx00_mailbox_command()
255 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_mailbox_command()
256 if (ha->isp_ops->abort_isp(vha)) { in qlafx00_mailbox_command()
259 &vha->dpc_flags); in qlafx00_mailbox_command()
261 clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); in qlafx00_mailbox_command()
262 ql_dbg(ql_dbg_mbx, vha, 0x1162, in qlafx00_mailbox_command()
298 qlafx00_driver_shutdown(scsi_qla_host_t *vha, int tmo) in qlafx00_driver_shutdown() argument
304 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1166, in qlafx00_driver_shutdown()
315 rval = qlafx00_mailbox_command(vha, mcp); in qlafx00_driver_shutdown()
318 ql_dbg(ql_dbg_mbx, vha, 0x1167, in qlafx00_driver_shutdown()
321 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1168, in qlafx00_driver_shutdown()
344 qlafx00_get_firmware_state(scsi_qla_host_t *vha, uint32_t *states) in qlafx00_get_firmware_state() argument
350 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1169, in qlafx00_get_firmware_state()
358 rval = qlafx00_mailbox_command(vha, mcp); in qlafx00_get_firmware_state()
364 ql_dbg(ql_dbg_mbx, vha, 0x116a, in qlafx00_get_firmware_state()
367 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116b, in qlafx00_get_firmware_state()
391 qlafx00_init_firmware(scsi_qla_host_t *vha, uint16_t size) in qlafx00_init_firmware() argument
396 struct qla_hw_data *ha = vha->hw; in qlafx00_init_firmware()
398 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116c, in qlafx00_init_firmware()
412 rval = qlafx00_mailbox_command(vha, mcp); in qlafx00_init_firmware()
415 ql_dbg(ql_dbg_mbx, vha, 0x116d, in qlafx00_init_firmware()
418 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116e, in qlafx00_init_firmware()
428 qlafx00_mbx_reg_test(scsi_qla_host_t *vha) in qlafx00_mbx_reg_test() argument
434 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116f, in qlafx00_mbx_reg_test()
463 rval = qlafx00_mailbox_command(vha, mcp); in qlafx00_mbx_reg_test()
480 ql_dbg(ql_dbg_mbx, vha, 0x1170, in qlafx00_mbx_reg_test()
483 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1171, in qlafx00_mbx_reg_test()
496 qlafx00_pci_config(scsi_qla_host_t *vha) in qlafx00_pci_config() argument
499 struct qla_hw_data *ha = vha->hw; in qlafx00_pci_config()
524 qlafx00_soc_cpu_reset(scsi_qla_host_t *vha) in qlafx00_soc_cpu_reset() argument
527 struct qla_hw_data *ha = vha->hw; in qlafx00_soc_cpu_reset()
631 qlafx00_soft_reset(scsi_qla_host_t *vha) in qlafx00_soft_reset() argument
633 struct qla_hw_data *ha = vha->hw; in qlafx00_soft_reset()
640 qlafx00_soc_cpu_reset(vha); in qlafx00_soft_reset()
650 qlafx00_chip_diag(scsi_qla_host_t *vha) in qlafx00_chip_diag() argument
653 struct qla_hw_data *ha = vha->hw; in qlafx00_chip_diag()
658 rval = qlafx00_mbx_reg_test(vha); in qlafx00_chip_diag()
660 ql_log(ql_log_warn, vha, 0x1165, in qlafx00_chip_diag()
670 qlafx00_config_rings(struct scsi_qla_host *vha) in qlafx00_config_rings() argument
672 struct qla_hw_data *ha = vha->hw; in qlafx00_config_rings()
686 qlafx00_pci_info_str(struct scsi_qla_host *vha, char *str) in qlafx00_pci_info_str() argument
688 struct qla_hw_data *ha = vha->hw; in qlafx00_pci_info_str()
698 qlafx00_fw_version_str(struct scsi_qla_host *vha, char *str, size_t size) in qlafx00_fw_version_str() argument
700 struct qla_hw_data *ha = vha->hw; in qlafx00_fw_version_str()
741 qlafx00_loop_reset(scsi_qla_host_t *vha) in qlafx00_loop_reset() argument
745 struct qla_hw_data *ha = vha->hw; in qlafx00_loop_reset()
748 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_loop_reset()
754 ql_dbg(ql_dbg_taskm, vha, 0x803d, in qlafx00_loop_reset()
831 qlafx00_save_queue_ptrs(struct scsi_qla_host *vha) in qlafx00_save_queue_ptrs() argument
833 struct qla_hw_data *ha = vha->hw; in qlafx00_save_queue_ptrs()
845 ql_dbg(ql_dbg_init, vha, 0x012d, in qlafx00_save_queue_ptrs()
850 ql_dbg(ql_dbg_init, vha, 0x012e, in qlafx00_save_queue_ptrs()
857 qlafx00_config_queues(struct scsi_qla_host *vha) in qlafx00_config_queues() argument
859 struct qla_hw_data *ha = vha->hw; in qlafx00_config_queues()
873 ql_dbg(ql_dbg_init, vha, 0x0130, in qlafx00_config_queues()
888 ql_dbg(ql_dbg_init, vha, 0x0132, in qlafx00_config_queues()
898 qlafx00_init_fw_ready(scsi_qla_host_t *vha) in qlafx00_init_fw_ready() argument
903 struct qla_hw_data *ha = vha->hw; in qlafx00_init_fw_ready()
918 rval = qlafx00_driver_shutdown(vha, 10); in qlafx00_init_fw_ready()
920 qlafx00_soft_reset(vha); in qlafx00_init_fw_ready()
928 ql_dbg(ql_dbg_mbx, vha, 0x0133, in qlafx00_init_fw_ready()
940 qlafx00_soft_reset(vha); in qlafx00_init_fw_ready()
954 ql_dbg(ql_dbg_init, vha, 0x0134, in qlafx00_init_fw_ready()
990 ql_dbg(ql_dbg_init, vha, 0x0135, in qlafx00_init_fw_ready()
997 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_init_fw_ready()
1016 ql_dbg(ql_dbg_init, vha, 0x0136, in qlafx00_init_fw_ready()
1020 rval = qlafx00_driver_shutdown(vha, 10); in qlafx00_init_fw_ready()
1033 ql_dbg(ql_dbg_init, vha, 0x0137, in qlafx00_init_fw_ready()
1046 ql_dbg(ql_dbg_init, vha, 0x0138, in qlafx00_init_fw_ready()
1049 ql_dbg(ql_dbg_init, vha, 0x0139, in qlafx00_init_fw_ready()
1062 qlafx00_fw_ready(scsi_qla_host_t *vha) in qlafx00_fw_ready() argument
1077 if (!vha->flags.init_done) in qlafx00_fw_ready()
1078 ql_dbg(ql_dbg_init, vha, 0x013a, in qlafx00_fw_ready()
1082 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_fw_ready()
1086 ql_dbg(ql_dbg_init, vha, 0x013b, in qlafx00_fw_ready()
1100 ql_dbg(ql_dbg_init, vha, 0x013c, in qlafx00_fw_ready()
1106 ql_dbg(ql_dbg_init, vha, 0x013d, in qlafx00_fw_ready()
1109 ql_dbg(ql_dbg_init, vha, 0x013e, in qlafx00_fw_ready()
1116 qlafx00_find_all_targets(scsi_qla_host_t *vha, in qlafx00_find_all_targets() argument
1123 struct qla_hw_data *ha = vha->hw; in qlafx00_find_all_targets()
1127 if (!test_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags)) in qlafx00_find_all_targets()
1130 if ((atomic_read(&vha->loop_down_timer) || in qlafx00_find_all_targets()
1131 STATE_TRANSITION(vha))) { in qlafx00_find_all_targets()
1132 atomic_set(&vha->loop_down_timer, 0); in qlafx00_find_all_targets()
1133 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_find_all_targets()
1137 ql_dbg(ql_dbg_disc + ql_dbg_init, vha, 0x2088, in qlafx00_find_all_targets()
1139 ql_dump_buffer(ql_dbg_disc + ql_dbg_init, vha, in qlafx00_find_all_targets()
1143 new_fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlafx00_find_all_targets()
1152 rval = qlafx00_fx_disc(vha, new_fcport, in qlafx00_find_all_targets()
1155 ql_log(ql_log_warn, vha, 0x208a, in qlafx00_find_all_targets()
1163 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_find_all_targets()
1181 ql_dbg(ql_dbg_disc + ql_dbg_init, vha, 0x208b, in qlafx00_find_all_targets()
1190 ql_log(ql_log_info, vha, 0x208c, in qlafx00_find_all_targets()
1202 ql_log(ql_log_info, vha, 0x208d, in qlafx00_find_all_targets()
1204 qla2x00_update_fcport(vha, fcport); in qlafx00_find_all_targets()
1206 ql_log(ql_log_info, vha, 0x208e, in qlafx00_find_all_targets()
1210 qla2x00_mark_device_lost(vha, fcport, 0, 0); in qlafx00_find_all_targets()
1211 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_find_all_targets()
1225 new_fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlafx00_find_all_targets()
1246 qlafx00_configure_all_targets(scsi_qla_host_t *vha) in qlafx00_configure_all_targets() argument
1252 rval = qlafx00_fx_disc(vha, &vha->hw->mr.fcport, in qlafx00_configure_all_targets()
1255 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_configure_all_targets()
1259 rval = qlafx00_find_all_targets(vha, &new_fcports); in qlafx00_configure_all_targets()
1261 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_configure_all_targets()
1268 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_configure_all_targets()
1269 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) in qlafx00_configure_all_targets()
1274 qla2x00_mark_device_lost(vha, fcport, 0, 0); in qlafx00_configure_all_targets()
1282 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) in qlafx00_configure_all_targets()
1285 qla2x00_update_fcport(vha, fcport); in qlafx00_configure_all_targets()
1286 list_move_tail(&fcport->list, &vha->vp_fcports); in qlafx00_configure_all_targets()
1287 ql_log(ql_log_info, vha, 0x208f, in qlafx00_configure_all_targets()
1317 qlafx00_configure_devices(scsi_qla_host_t *vha) in qlafx00_configure_devices() argument
1323 flags = vha->dpc_flags; in qlafx00_configure_devices()
1325 ql_dbg(ql_dbg_disc, vha, 0x2090, in qlafx00_configure_devices()
1328 rval = qlafx00_configure_all_targets(vha); in qlafx00_configure_devices()
1331 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) { in qlafx00_configure_devices()
1334 atomic_set(&vha->loop_state, LOOP_READY); in qlafx00_configure_devices()
1335 ql_log(ql_log_info, vha, 0x2091, in qlafx00_configure_devices()
1341 ql_dbg(ql_dbg_disc, vha, 0x2092, in qlafx00_configure_devices()
1344 ql_dbg(ql_dbg_disc, vha, 0x2093, in qlafx00_configure_devices()
1351 qlafx00_abort_isp_cleanup(scsi_qla_host_t *vha, bool critemp) in qlafx00_abort_isp_cleanup() argument
1353 struct qla_hw_data *ha = vha->hw; in qlafx00_abort_isp_cleanup()
1356 vha->flags.online = 0; in qlafx00_abort_isp_cleanup()
1361 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1362 vha->qla_stats.total_isp_aborts++; in qlafx00_abort_isp_cleanup()
1363 ql_log(ql_log_info, vha, 0x013f, in qlafx00_abort_isp_cleanup()
1365 ha->isp_ops->reset_chip(vha); in qlafx00_abort_isp_cleanup()
1368 if (atomic_read(&vha->loop_state) != LOOP_DOWN) { in qlafx00_abort_isp_cleanup()
1369 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_abort_isp_cleanup()
1370 atomic_set(&vha->loop_down_timer, in qlafx00_abort_isp_cleanup()
1373 if (!atomic_read(&vha->loop_down_timer)) in qlafx00_abort_isp_cleanup()
1374 atomic_set(&vha->loop_down_timer, in qlafx00_abort_isp_cleanup()
1379 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_abort_isp_cleanup()
1387 qla2x00_abort_all_cmds(vha, DID_NO_CONNECT << 16); in qlafx00_abort_isp_cleanup()
1390 qla2x00_abort_all_cmds(vha, DID_RESET << 16); in qlafx00_abort_isp_cleanup()
1394 qla2x00_free_irqs(vha); in qlafx00_abort_isp_cleanup()
1396 set_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1398 set_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1403 ql_log(ql_log_info, vha, 0x0140, in qlafx00_abort_isp_cleanup()
1435 qlafx00_rescan_isp(scsi_qla_host_t *vha) in qlafx00_rescan_isp() argument
1438 struct qla_hw_data *ha = vha->hw; in qlafx00_rescan_isp()
1452 ql_dbg(ql_dbg_disc, vha, 0x2094, in qlafx00_rescan_isp()
1461 status = qla2x00_init_rings(vha); in qlafx00_rescan_isp()
1463 vha->flags.online = 1; in qlafx00_rescan_isp()
1466 if ((vha->device_flags & DFLG_NO_CABLE)) in qlafx00_rescan_isp()
1469 if (qlafx00_fx_disc(vha, in qlafx00_rescan_isp()
1470 &vha->hw->mr.fcport, FXDISC_REG_HOST_INFO)) in qlafx00_rescan_isp()
1471 ql_dbg(ql_dbg_disc, vha, 0x2095, in qlafx00_rescan_isp()
1474 scsi_unblock_requests(vha->host); in qlafx00_rescan_isp()
1479 qlafx00_timer_routine(scsi_qla_host_t *vha) in qlafx00_timer_routine() argument
1481 struct qla_hw_data *ha = vha->hw; in qlafx00_timer_routine()
1492 (!test_bit(UNLOADING, &vha->dpc_flags)) && in qlafx00_timer_routine()
1493 (!test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) && in qlafx00_timer_routine()
1504 &vha->dpc_flags); in qlafx00_timer_routine()
1505 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1513 if (test_bit(FX00_RESET_RECOVERY, &vha->dpc_flags)) { in qlafx00_timer_routine()
1517 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_timer_routine()
1518 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1522 set_bit(FX00_TARGET_SCAN, &vha->dpc_flags); in qlafx00_timer_routine()
1523 clear_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_timer_routine()
1524 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1560 if (test_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags)) { in qlafx00_timer_routine()
1567 ql_dbg(ql_dbg_timer, vha, 0x6012, in qlafx00_timer_routine()
1572 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_timer_routine()
1574 &vha->dpc_flags); in qlafx00_timer_routine()
1575 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1590 set_bit(FX00_HOST_INFO_RESEND, &vha->dpc_flags); in qlafx00_timer_routine()
1593 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1612 qlafx00_reset_initialize(scsi_qla_host_t *vha) in qlafx00_reset_initialize() argument
1614 struct qla_hw_data *ha = vha->hw; in qlafx00_reset_initialize()
1616 if (vha->device_flags & DFLG_DEV_FAILED) { in qlafx00_reset_initialize()
1617 ql_dbg(ql_dbg_init, vha, 0x0142, in qlafx00_reset_initialize()
1624 if (vha->flags.online) { in qlafx00_reset_initialize()
1625 scsi_block_requests(vha->host); in qlafx00_reset_initialize()
1626 qlafx00_abort_isp_cleanup(vha, false); in qlafx00_reset_initialize()
1629 ql_log(ql_log_info, vha, 0x0143, in qlafx00_reset_initialize()
1646 qlafx00_abort_isp(scsi_qla_host_t *vha) in qlafx00_abort_isp() argument
1648 struct qla_hw_data *ha = vha->hw; in qlafx00_abort_isp()
1650 if (vha->flags.online) { in qlafx00_abort_isp()
1653 clear_bit(ISP_ABORT_RETRY, &vha->dpc_flags); in qlafx00_abort_isp()
1657 scsi_block_requests(vha->host); in qlafx00_abort_isp()
1658 qlafx00_abort_isp_cleanup(vha, false); in qlafx00_abort_isp()
1660 scsi_block_requests(vha->host); in qlafx00_abort_isp()
1661 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_abort_isp()
1662 vha->qla_stats.total_isp_aborts++; in qlafx00_abort_isp()
1663 ha->isp_ops->reset_chip(vha); in qlafx00_abort_isp()
1664 set_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp()
1669 ql_log(ql_log_info, vha, 0x0145, in qlafx00_abort_isp()
1676 qlafx00_get_fcport(struct scsi_qla_host *vha, int tgt_id) in qlafx00_get_fcport() argument
1681 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_get_fcport()
1683 ql_dbg(ql_dbg_async, vha, 0x5072, in qlafx00_get_fcport()
1694 qlafx00_tgt_detach(struct scsi_qla_host *vha, int tgt_id) in qlafx00_tgt_detach() argument
1698 ql_log(ql_log_info, vha, 0x5073, in qlafx00_tgt_detach()
1701 fcport = qlafx00_get_fcport(vha, tgt_id); in qlafx00_tgt_detach()
1705 qla2x00_mark_device_lost(vha, fcport, 0, 0); in qlafx00_tgt_detach()
1711 qlafx00_process_aen(struct scsi_qla_host *vha, struct qla_work_evt *evt) in qlafx00_process_aen() argument
1723 if (!vha->flags.fw_tgt_reported) in qlafx00_process_aen()
1724 vha->flags.fw_tgt_reported = 1; in qlafx00_process_aen()
1725 atomic_set(&vha->loop_down_timer, 0); in qlafx00_process_aen()
1726 atomic_set(&vha->loop_state, LOOP_UP); in qlafx00_process_aen()
1727 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_process_aen()
1728 qla2xxx_wake_dpc(vha); in qlafx00_process_aen()
1730 qlafx00_tgt_detach(vha, evt->u.aenfx.mbx[3]); in qlafx00_process_aen()
1734 if (!vha->flags.fw_tgt_reported) in qlafx00_process_aen()
1735 vha->flags.fw_tgt_reported = 1; in qlafx00_process_aen()
1736 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_process_aen()
1738 vha->device_flags |= DFLG_NO_CABLE; in qlafx00_process_aen()
1739 qla2x00_mark_all_devices_lost(vha, 1); in qlafx00_process_aen()
1752 ql_log(ql_log_info, vha, 0x5082, in qlafx00_process_aen()
1756 scsi_block_requests(vha->host); in qlafx00_process_aen()
1757 qlafx00_abort_isp_cleanup(vha, true); in qlafx00_process_aen()
1758 scsi_unblock_requests(vha->host); in qlafx00_process_aen()
1762 fc_host_post_event(vha->host, fc_get_event_number(), in qlafx00_process_aen()
1769 qlafx00_update_host_attr(scsi_qla_host_t *vha, struct port_info_data *pinfo) in qlafx00_update_host_attr() argument
1776 fc_host_node_name(vha->host) = node_name; in qlafx00_update_host_attr()
1777 fc_host_port_name(vha->host) = port_name; in qlafx00_update_host_attr()
1779 vha->hw->current_topology = ISP_CFG_F; in qlafx00_update_host_attr()
1781 atomic_set(&vha->loop_state, LOOP_READY); in qlafx00_update_host_attr()
1783 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_update_host_attr()
1784 vha->hw->link_data_rate = (uint16_t)pinfo->link_config; in qlafx00_update_host_attr()
1806 qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type) in qlafx00_fx_disc() argument
1811 struct qla_hw_data *ha = vha->hw; in qlafx00_fx_disc()
1817 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL); in qlafx00_fx_disc()
1850 ql_log(ql_log_warn, vha, 0x303c, in qlafx00_fx_disc()
1891 ql_dbg(ql_dbg_init, vha, 0x0149, in qlafx00_fx_disc()
1894 ql_dbg(ql_dbg_init, vha, 0x014a, in qlafx00_fx_disc()
1899 ql_dbg(ql_dbg_init, vha, 0x014b, in qlafx00_fx_disc()
1903 ql_dbg(ql_dbg_init, vha, 0x014c, in qlafx00_fx_disc()
1909 ql_dump_buffer(ql_dbg_init + ql_dbg_disc, vha, 0x014d, in qlafx00_fx_disc()
1939 strcpy(vha->hw->model_number, pinfo->model_num); in qlafx00_fx_disc()
1940 strcpy(vha->hw->model_desc, pinfo->model_description); in qlafx00_fx_disc()
1941 memcpy(&vha->hw->mr.symbolic_name, pinfo->symbolic_name, in qlafx00_fx_disc()
1942 sizeof(vha->hw->mr.symbolic_name)); in qlafx00_fx_disc()
1943 memcpy(&vha->hw->mr.serial_num, pinfo->serial_num, in qlafx00_fx_disc()
1944 sizeof(vha->hw->mr.serial_num)); in qlafx00_fx_disc()
1945 memcpy(&vha->hw->mr.hw_version, pinfo->hw_version, in qlafx00_fx_disc()
1946 sizeof(vha->hw->mr.hw_version)); in qlafx00_fx_disc()
1947 memcpy(&vha->hw->mr.fw_version, pinfo->fw_version, in qlafx00_fx_disc()
1948 sizeof(vha->hw->mr.fw_version)); in qlafx00_fx_disc()
1949 strim(vha->hw->mr.fw_version); in qlafx00_fx_disc()
1950 memcpy(&vha->hw->mr.uboot_version, pinfo->uboot_version, in qlafx00_fx_disc()
1951 sizeof(vha->hw->mr.uboot_version)); in qlafx00_fx_disc()
1952 memcpy(&vha->hw->mr.fru_serial_num, pinfo->fru_serial_num, in qlafx00_fx_disc()
1953 sizeof(vha->hw->mr.fru_serial_num)); in qlafx00_fx_disc()
1954 vha->hw->mr.critical_temperature = in qlafx00_fx_disc()
1962 memcpy(vha->node_name, pinfo->node_name, WWN_SIZE); in qlafx00_fx_disc()
1963 memcpy(vha->port_name, pinfo->port_name, WWN_SIZE); in qlafx00_fx_disc()
1964 vha->d_id.b.domain = pinfo->port_id[0]; in qlafx00_fx_disc()
1965 vha->d_id.b.area = pinfo->port_id[1]; in qlafx00_fx_disc()
1966 vha->d_id.b.al_pa = pinfo->port_id[2]; in qlafx00_fx_disc()
1967 qlafx00_update_host_attr(vha, pinfo); in qlafx00_fx_disc()
1968 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0141, in qlafx00_fx_disc()
1976 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0144, in qlafx00_fx_disc()
1981 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0146, in qlafx00_fx_disc()
1983 memcpy(vha->hw->gid_list, pinfo, QLAFX00_TGT_NODE_LIST_SIZE); in qlafx00_fx_disc()
2002 sp->free(vha, sp); in qlafx00_fx_disc()
2018 qlafx00_initialize_adapter(scsi_qla_host_t *vha) in qlafx00_initialize_adapter() argument
2021 struct qla_hw_data *ha = vha->hw; in qlafx00_initialize_adapter()
2025 vha->flags.online = 0; in qlafx00_initialize_adapter()
2027 vha->flags.reset_active = 0; in qlafx00_initialize_adapter()
2030 atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME); in qlafx00_initialize_adapter()
2031 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_initialize_adapter()
2032 vha->device_flags = DFLG_NO_CABLE; in qlafx00_initialize_adapter()
2033 vha->dpc_flags = 0; in qlafx00_initialize_adapter()
2034 vha->flags.management_server_logged_in = 0; in qlafx00_initialize_adapter()
2041 ql_dbg(ql_dbg_init, vha, 0x0147, in qlafx00_initialize_adapter()
2044 rval = ha->isp_ops->pci_config(vha); in qlafx00_initialize_adapter()
2046 ql_log(ql_log_warn, vha, 0x0148, in qlafx00_initialize_adapter()
2051 rval = qlafx00_init_fw_ready(vha); in qlafx00_initialize_adapter()
2055 qlafx00_save_queue_ptrs(vha); in qlafx00_initialize_adapter()
2057 rval = qlafx00_config_queues(vha); in qlafx00_initialize_adapter()
2065 rval = qla2x00_alloc_outstanding_cmds(ha, vha->req); in qlafx00_initialize_adapter()
2069 rval = qla2x00_init_rings(vha); in qlafx00_initialize_adapter()
2073 ql_dbg(ql_dbg_init, vha, 0x0152, in qlafx00_initialize_adapter()
2084 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); in qlafx00_fw_state_show() local
2088 if (qla2x00_reset_active(vha)) in qlafx00_fw_state_show()
2089 ql_log(ql_log_warn, vha, 0x70ce, in qlafx00_fw_state_show()
2091 else if (!vha->hw->flags.eeh_busy) { in qlafx00_fw_state_show()
2092 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_fw_state_show()
2130 struct scsi_qla_host *vha = sp->fcport->vha; in qlafx00_handle_sense() local
2154 ql_dbg(ql_dbg_io, vha, 0x304d, in qlafx00_handle_sense()
2163 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3039, in qlafx00_handle_sense()
2165 sp->fcport->vha->host_no, cp->device->id, cp->device->lun, in qlafx00_handle_sense()
2167 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x3049, in qlafx00_handle_sense()
2173 qlafx00_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_tm_iocb_entry() argument
2184 sp->done(vha, sp, 0); in qlafx00_tm_iocb_entry()
2188 qlafx00_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_abort_iocb_entry() argument
2195 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_abort_iocb_entry()
2201 sp->done(vha, sp, 0); in qlafx00_abort_iocb_entry()
2205 qlafx00_ioctl_iosb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_ioctl_iosb_entry() argument
2216 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_ioctl_iosb_entry()
2254 sp->fcport->vha, 0x5080, in qlafx00_ioctl_iosb_entry()
2258 sp->fcport->vha, 0x5074, in qlafx00_ioctl_iosb_entry()
2265 sp->done(vha, sp, res); in qlafx00_ioctl_iosb_entry()
2274 qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) in qlafx00_status_entry() argument
2287 struct qla_hw_data *ha = vha->hw; in qlafx00_status_entry()
2311 ql_dbg(ql_dbg_io, vha, 0x3034, in qlafx00_status_entry()
2314 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_status_entry()
2315 qla2xxx_wake_dpc(vha); in qlafx00_status_entry()
2321 qlafx00_tm_iocb_entry(vha, req, pkt, sp, in qlafx00_status_entry()
2328 qla2x00_process_completed_request(vha, req, handle); in qlafx00_status_entry()
2335 ql_dbg(ql_dbg_io, vha, 0x3048, in qlafx00_status_entry()
2381 ql_dbg(ql_dbg_io, fcport->vha, 0x3050, in qlafx00_status_entry()
2394 ql_dbg(ql_dbg_io, fcport->vha, 0x3051, in qlafx00_status_entry()
2420 ql_dbg(ql_dbg_io, fcport->vha, 0x3052, in qlafx00_status_entry()
2433 ql_dbg(ql_dbg_io, fcport->vha, 0x3053, in qlafx00_status_entry()
2450 ql_dbg(ql_dbg_io, fcport->vha, 0x3054, in qlafx00_status_entry()
2458 ql_dbg(ql_dbg_io, fcport->vha, 0x3055, in qlafx00_status_entry()
2474 ql_dbg(ql_dbg_io, fcport->vha, 0x3056, in qlafx00_status_entry()
2508 ql_dbg(ql_dbg_io, fcport->vha, 0x3057, in qlafx00_status_entry()
2513 qla2x00_mark_device_lost(fcport->vha, fcport, 1, 1); in qlafx00_status_entry()
2526 ql_dbg(ql_dbg_io, fcport->vha, 0x3058, in qlafx00_status_entry()
2531 comp_status, scsi_status, res, vha->host_no, in qlafx00_status_entry()
2553 struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); in qlafx00_status_cont_entry() local
2560 ql_dbg(ql_dbg_io, vha, 0x3037, in qlafx00_status_cont_entry()
2566 ql_dbg(ql_dbg_io, vha, 0x304b, in qlafx00_status_cont_entry()
2572 ql_log(ql_log_warn, vha, 0x303b, in qlafx00_status_cont_entry()
2580 ql_dbg(ql_dbg_io, vha, 0x304c, in qlafx00_status_cont_entry()
2585 ql_dbg(ql_dbg_io, vha, 0x304f, in qlafx00_status_cont_entry()
2595 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x304e, in qlafx00_status_cont_entry()
2598 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x304a, in qlafx00_status_cont_entry()
2624 qlafx00_multistatus_entry(struct scsi_qla_host *vha, in qlafx00_multistatus_entry() argument
2629 struct qla_hw_data *ha = vha->hw; in qlafx00_multistatus_entry()
2640 ql_dbg(ql_dbg_io, vha, 0x3035, in qlafx00_multistatus_entry()
2642 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_multistatus_entry()
2643 qla2xxx_wake_dpc(vha); in qlafx00_multistatus_entry()
2662 ql_dbg(ql_dbg_io, vha, 0x3044, in qlafx00_multistatus_entry()
2664 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_multistatus_entry()
2665 qla2xxx_wake_dpc(vha); in qlafx00_multistatus_entry()
2668 qla2x00_process_completed_request(vha, req, handle); in qlafx00_multistatus_entry()
2679 qlafx00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, in qlafx00_error_entry() argument
2683 struct qla_hw_data *ha = vha->hw; in qlafx00_error_entry()
2689 ql_dbg(ql_dbg_async, vha, 0x507f, in qlafx00_error_entry()
2694 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_error_entry()
2700 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_error_entry()
2701 qla2xxx_wake_dpc(vha); in qlafx00_error_entry()
2709 qlafx00_process_response_queue(struct scsi_qla_host *vha, in qlafx00_process_response_queue() argument
2738 qlafx00_error_entry(vha, rsp, in qlafx00_process_response_queue()
2746 qlafx00_status_entry(vha, rsp, pkt); in qlafx00_process_response_queue()
2754 qlafx00_multistatus_entry(vha, rsp, pkt); in qlafx00_process_response_queue()
2758 qlafx00_abort_iocb_entry(vha, rsp->req, in qlafx00_process_response_queue()
2763 qlafx00_ioctl_iosb_entry(vha, rsp->req, in qlafx00_process_response_queue()
2768 ql_dbg(ql_dbg_async, vha, 0x5081, in qlafx00_process_response_queue()
2785 qlafx00_async_event(scsi_qla_host_t *vha) in qlafx00_async_event() argument
2787 struct qla_hw_data *ha = vha->hw; in qlafx00_async_event()
2795 ql_log(ql_log_warn, vha, 0x5079, in qlafx00_async_event()
2797 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_async_event()
2801 ql_dbg(ql_dbg_async, vha, 0x5076, in qlafx00_async_event()
2803 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_async_event()
2804 qla2xxx_wake_dpc(vha); in qlafx00_async_event()
2811 ql_dbg(ql_dbg_async, vha, 0x5077, in qlafx00_async_event()
2819 ql_log(ql_log_info, vha, 0x5085, in qlafx00_async_event()
2826 ql_log(ql_log_info, vha, 0x5086, in qlafx00_async_event()
2833 ql_log(ql_log_info, vha, 0x5083, in qlafx00_async_event()
2847 ql_dbg(ql_dbg_async, vha, 0x5078, in qlafx00_async_event()
2853 qlafx00_post_aenfx_work(vha, ha->aenmb[0], in qlafx00_async_event()
2864 qlafx00_mbx_completion(scsi_qla_host_t *vha, uint32_t mb0) in qlafx00_mbx_completion() argument
2868 struct qla_hw_data *ha = vha->hw; in qlafx00_mbx_completion()
2872 ql_dbg(ql_dbg_async, vha, 0x507e, "MBX pointer ERROR.\n"); in qlafx00_mbx_completion()
2897 scsi_qla_host_t *vha; in qlafx00_intr_handler() local
2924 vha = pci_get_drvdata(ha->pdev); in qlafx00_intr_handler()
2927 if (qla2x00_check_reg32_for_disconnect(vha, stat)) in qlafx00_intr_handler()
2935 qlafx00_mbx_completion(vha, mb[0]); in qlafx00_intr_handler()
2941 qlafx00_async_event(vha); in qlafx00_intr_handler()
2945 qlafx00_process_response_queue(vha, rsp); in qlafx00_intr_handler()
2990 scsi_qla_host_t *vha; in qlafx00_build_scsi_iocbs() local
2998 vha = sp->fcport->vha; in qlafx00_build_scsi_iocbs()
2999 req = vha->req; in qlafx00_build_scsi_iocbs()
3017 vha->qla_stats.output_bytes += scsi_bufflen(cmd); in qlafx00_build_scsi_iocbs()
3020 vha->qla_stats.input_bytes += scsi_bufflen(cmd); in qlafx00_build_scsi_iocbs()
3082 struct scsi_qla_host *vha = sp->fcport->vha; in qlafx00_start_scsi() local
3083 struct qla_hw_data *ha = vha->hw; in qlafx00_start_scsi()
3090 req = vha->req; in qlafx00_start_scsi()
3120 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); in qlafx00_start_scsi()
3168 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302e, in qlafx00_start_scsi()
3170 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x3032, in qlafx00_start_scsi()
3206 scsi_qla_host_t *vha = sp->fcport->vha; in qlafx00_tm_iocb() local
3207 struct req_que *req = vha->req; in qlafx00_tm_iocb()
3233 scsi_qla_host_t *vha = sp->fcport->vha; in qlafx00_abort_iocb() local
3234 struct req_que *req = vha->req; in qlafx00_abort_iocb()
3345 sp->fcport->vha->req, in qlafx00_fxdisc_iocb()
3367 sp->fcport->vha, 0x3042, in qlafx00_fxdisc_iocb()
3376 sp->fcport->vha, 0x3043, in qlafx00_fxdisc_iocb()
3408 sp->fcport->vha->req, in qlafx00_fxdisc_iocb()
3430 sp->fcport->vha, 0x3045, in qlafx00_fxdisc_iocb()
3439 sp->fcport->vha, 0x3046, in qlafx00_fxdisc_iocb()
3451 sp->fcport->vha, 0x3047, in qlafx00_fxdisc_iocb()