Lines Matching refs:vha
40 qlafx00_mailbox_command(scsi_qla_host_t *vha, struct mbx_cmd_32 *mcp) in qlafx00_mailbox_command() argument
54 struct qla_hw_data *ha = vha->hw; in qlafx00_mailbox_command()
58 ql_log(ql_log_warn, vha, 0x115c, in qlafx00_mailbox_command()
64 if (vha->device_flags & DFLG_DEV_FAILED) { in qlafx00_mailbox_command()
65 ql_log(ql_log_warn, vha, 0x115f, in qlafx00_mailbox_command()
77 ql_log(ql_log_warn, vha, 0x1175, in qlafx00_mailbox_command()
85 ql_log(ql_log_warn, vha, 0x1176, in qlafx00_mailbox_command()
98 ql_log(ql_log_warn, vha, 0x1177, in qlafx00_mailbox_command()
108 ql_dbg(ql_dbg_mbx, vha, 0x1178, in qlafx00_mailbox_command()
133 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1172, in qlafx00_mailbox_command()
135 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1173, in qlafx00_mailbox_command()
137 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1174, in qlafx00_mailbox_command()
141 ql_dbg(ql_dbg_mbx, vha, 0x1179, in qlafx00_mailbox_command()
154 ql_dbg(ql_dbg_mbx, vha, 0x112c, in qlafx00_mailbox_command()
173 ql_dbg(ql_dbg_mbx, vha, 0x112d, in qlafx00_mailbox_command()
182 ql_dbg(ql_dbg_mbx, vha, 0x112e, in qlafx00_mailbox_command()
215 ql_dbg(ql_dbg_mbx, vha, 0x113a, in qlafx00_mailbox_command()
227 ql_dbg(ql_dbg_mbx, vha, 0x115d, in qlafx00_mailbox_command()
230 if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && in qlafx00_mailbox_command()
231 !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) && in qlafx00_mailbox_command()
232 !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { in qlafx00_mailbox_command()
239 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_mailbox_command()
240 qla2xxx_wake_dpc(vha); in qlafx00_mailbox_command()
244 ql_dbg(ql_dbg_mbx, vha, 0x1160, in qlafx00_mailbox_command()
247 if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && in qlafx00_mailbox_command()
248 !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) && in qlafx00_mailbox_command()
249 !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { in qlafx00_mailbox_command()
256 set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); in qlafx00_mailbox_command()
257 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_mailbox_command()
258 if (ha->isp_ops->abort_isp(vha)) { in qlafx00_mailbox_command()
261 &vha->dpc_flags); in qlafx00_mailbox_command()
263 clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); in qlafx00_mailbox_command()
264 ql_dbg(ql_dbg_mbx, vha, 0x1162, in qlafx00_mailbox_command()
300 qlafx00_driver_shutdown(scsi_qla_host_t *vha, int tmo) in qlafx00_driver_shutdown() argument
306 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1166, in qlafx00_driver_shutdown()
317 rval = qlafx00_mailbox_command(vha, mcp); in qlafx00_driver_shutdown()
320 ql_dbg(ql_dbg_mbx, vha, 0x1167, in qlafx00_driver_shutdown()
323 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1168, in qlafx00_driver_shutdown()
346 qlafx00_get_firmware_state(scsi_qla_host_t *vha, uint32_t *states) in qlafx00_get_firmware_state() argument
352 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1169, in qlafx00_get_firmware_state()
360 rval = qlafx00_mailbox_command(vha, mcp); in qlafx00_get_firmware_state()
366 ql_dbg(ql_dbg_mbx, vha, 0x116a, in qlafx00_get_firmware_state()
369 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116b, in qlafx00_get_firmware_state()
393 qlafx00_init_firmware(scsi_qla_host_t *vha, uint16_t size) in qlafx00_init_firmware() argument
398 struct qla_hw_data *ha = vha->hw; in qlafx00_init_firmware()
400 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116c, in qlafx00_init_firmware()
414 rval = qlafx00_mailbox_command(vha, mcp); in qlafx00_init_firmware()
417 ql_dbg(ql_dbg_mbx, vha, 0x116d, in qlafx00_init_firmware()
420 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116e, in qlafx00_init_firmware()
430 qlafx00_mbx_reg_test(scsi_qla_host_t *vha) in qlafx00_mbx_reg_test() argument
436 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116f, in qlafx00_mbx_reg_test()
465 rval = qlafx00_mailbox_command(vha, mcp); in qlafx00_mbx_reg_test()
482 ql_dbg(ql_dbg_mbx, vha, 0x1170, in qlafx00_mbx_reg_test()
485 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1171, in qlafx00_mbx_reg_test()
498 qlafx00_pci_config(scsi_qla_host_t *vha) in qlafx00_pci_config() argument
501 struct qla_hw_data *ha = vha->hw; in qlafx00_pci_config()
526 qlafx00_soc_cpu_reset(scsi_qla_host_t *vha) in qlafx00_soc_cpu_reset() argument
529 struct qla_hw_data *ha = vha->hw; in qlafx00_soc_cpu_reset()
633 qlafx00_soft_reset(scsi_qla_host_t *vha) in qlafx00_soft_reset() argument
635 struct qla_hw_data *ha = vha->hw; in qlafx00_soft_reset()
642 qlafx00_soc_cpu_reset(vha); in qlafx00_soft_reset()
652 qlafx00_chip_diag(scsi_qla_host_t *vha) in qlafx00_chip_diag() argument
655 struct qla_hw_data *ha = vha->hw; in qlafx00_chip_diag()
660 rval = qlafx00_mbx_reg_test(vha); in qlafx00_chip_diag()
662 ql_log(ql_log_warn, vha, 0x1165, in qlafx00_chip_diag()
672 qlafx00_config_rings(struct scsi_qla_host *vha) in qlafx00_config_rings() argument
674 struct qla_hw_data *ha = vha->hw; in qlafx00_config_rings()
688 qlafx00_pci_info_str(struct scsi_qla_host *vha, char *str) in qlafx00_pci_info_str() argument
690 struct qla_hw_data *ha = vha->hw; in qlafx00_pci_info_str()
700 qlafx00_fw_version_str(struct scsi_qla_host *vha, char *str, size_t size) in qlafx00_fw_version_str() argument
702 struct qla_hw_data *ha = vha->hw; in qlafx00_fw_version_str()
743 qlafx00_loop_reset(scsi_qla_host_t *vha) in qlafx00_loop_reset() argument
747 struct qla_hw_data *ha = vha->hw; in qlafx00_loop_reset()
750 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_loop_reset()
756 ql_dbg(ql_dbg_taskm, vha, 0x803d, in qlafx00_loop_reset()
833 qlafx00_save_queue_ptrs(struct scsi_qla_host *vha) in qlafx00_save_queue_ptrs() argument
835 struct qla_hw_data *ha = vha->hw; in qlafx00_save_queue_ptrs()
847 ql_dbg(ql_dbg_init, vha, 0x012d, in qlafx00_save_queue_ptrs()
852 ql_dbg(ql_dbg_init, vha, 0x012e, in qlafx00_save_queue_ptrs()
859 qlafx00_config_queues(struct scsi_qla_host *vha) in qlafx00_config_queues() argument
861 struct qla_hw_data *ha = vha->hw; in qlafx00_config_queues()
875 ql_dbg(ql_dbg_init, vha, 0x0130, in qlafx00_config_queues()
890 ql_dbg(ql_dbg_init, vha, 0x0132, in qlafx00_config_queues()
900 qlafx00_init_fw_ready(scsi_qla_host_t *vha) in qlafx00_init_fw_ready() argument
905 struct qla_hw_data *ha = vha->hw; in qlafx00_init_fw_ready()
920 rval = qlafx00_driver_shutdown(vha, 10); in qlafx00_init_fw_ready()
922 qlafx00_soft_reset(vha); in qlafx00_init_fw_ready()
930 ql_dbg(ql_dbg_mbx, vha, 0x0133, in qlafx00_init_fw_ready()
942 qlafx00_soft_reset(vha); in qlafx00_init_fw_ready()
956 ql_dbg(ql_dbg_init, vha, 0x0134, in qlafx00_init_fw_ready()
992 ql_dbg(ql_dbg_init, vha, 0x0135, in qlafx00_init_fw_ready()
999 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_init_fw_ready()
1018 ql_dbg(ql_dbg_init, vha, 0x0136, in qlafx00_init_fw_ready()
1022 rval = qlafx00_driver_shutdown(vha, 10); in qlafx00_init_fw_ready()
1035 ql_dbg(ql_dbg_init, vha, 0x0137, in qlafx00_init_fw_ready()
1048 ql_dbg(ql_dbg_init, vha, 0x0138, in qlafx00_init_fw_ready()
1051 ql_dbg(ql_dbg_init, vha, 0x0139, in qlafx00_init_fw_ready()
1064 qlafx00_fw_ready(scsi_qla_host_t *vha) in qlafx00_fw_ready() argument
1079 if (!vha->flags.init_done) in qlafx00_fw_ready()
1080 ql_dbg(ql_dbg_init, vha, 0x013a, in qlafx00_fw_ready()
1084 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_fw_ready()
1088 ql_dbg(ql_dbg_init, vha, 0x013b, in qlafx00_fw_ready()
1102 ql_dbg(ql_dbg_init, vha, 0x013c, in qlafx00_fw_ready()
1108 ql_dbg(ql_dbg_init, vha, 0x013d, in qlafx00_fw_ready()
1111 ql_dbg(ql_dbg_init, vha, 0x013e, in qlafx00_fw_ready()
1118 qlafx00_find_all_targets(scsi_qla_host_t *vha, in qlafx00_find_all_targets() argument
1125 struct qla_hw_data *ha = vha->hw; in qlafx00_find_all_targets()
1129 if (!test_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags)) in qlafx00_find_all_targets()
1132 if ((atomic_read(&vha->loop_down_timer) || in qlafx00_find_all_targets()
1133 STATE_TRANSITION(vha))) { in qlafx00_find_all_targets()
1134 atomic_set(&vha->loop_down_timer, 0); in qlafx00_find_all_targets()
1135 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_find_all_targets()
1139 ql_dbg(ql_dbg_disc + ql_dbg_init, vha, 0x2088, in qlafx00_find_all_targets()
1141 ql_dump_buffer(ql_dbg_disc + ql_dbg_init, vha, in qlafx00_find_all_targets()
1145 new_fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlafx00_find_all_targets()
1154 rval = qlafx00_fx_disc(vha, new_fcport, in qlafx00_find_all_targets()
1157 ql_log(ql_log_warn, vha, 0x208a, in qlafx00_find_all_targets()
1165 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_find_all_targets()
1183 ql_dbg(ql_dbg_disc + ql_dbg_init, vha, 0x208b, in qlafx00_find_all_targets()
1192 ql_log(ql_log_info, vha, 0x208c, in qlafx00_find_all_targets()
1204 ql_log(ql_log_info, vha, 0x208d, in qlafx00_find_all_targets()
1206 qla2x00_update_fcport(vha, fcport); in qlafx00_find_all_targets()
1208 ql_log(ql_log_info, vha, 0x208e, in qlafx00_find_all_targets()
1212 qla2x00_mark_device_lost(vha, fcport, 0, 0); in qlafx00_find_all_targets()
1213 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_find_all_targets()
1227 new_fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlafx00_find_all_targets()
1248 qlafx00_configure_all_targets(scsi_qla_host_t *vha) in qlafx00_configure_all_targets() argument
1254 rval = qlafx00_fx_disc(vha, &vha->hw->mr.fcport, in qlafx00_configure_all_targets()
1257 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_configure_all_targets()
1261 rval = qlafx00_find_all_targets(vha, &new_fcports); in qlafx00_configure_all_targets()
1263 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_configure_all_targets()
1270 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_configure_all_targets()
1271 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) in qlafx00_configure_all_targets()
1276 qla2x00_mark_device_lost(vha, fcport, 0, 0); in qlafx00_configure_all_targets()
1284 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) in qlafx00_configure_all_targets()
1287 qla2x00_update_fcport(vha, fcport); in qlafx00_configure_all_targets()
1288 list_move_tail(&fcport->list, &vha->vp_fcports); in qlafx00_configure_all_targets()
1289 ql_log(ql_log_info, vha, 0x208f, in qlafx00_configure_all_targets()
1319 qlafx00_configure_devices(scsi_qla_host_t *vha) in qlafx00_configure_devices() argument
1325 flags = vha->dpc_flags; in qlafx00_configure_devices()
1327 ql_dbg(ql_dbg_disc, vha, 0x2090, in qlafx00_configure_devices()
1330 rval = qlafx00_configure_all_targets(vha); in qlafx00_configure_devices()
1333 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) { in qlafx00_configure_devices()
1336 atomic_set(&vha->loop_state, LOOP_READY); in qlafx00_configure_devices()
1337 ql_log(ql_log_info, vha, 0x2091, in qlafx00_configure_devices()
1343 ql_dbg(ql_dbg_disc, vha, 0x2092, in qlafx00_configure_devices()
1346 ql_dbg(ql_dbg_disc, vha, 0x2093, in qlafx00_configure_devices()
1353 qlafx00_abort_isp_cleanup(scsi_qla_host_t *vha, bool critemp) in qlafx00_abort_isp_cleanup() argument
1355 struct qla_hw_data *ha = vha->hw; in qlafx00_abort_isp_cleanup()
1358 vha->flags.online = 0; in qlafx00_abort_isp_cleanup()
1363 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1364 vha->qla_stats.total_isp_aborts++; in qlafx00_abort_isp_cleanup()
1365 ql_log(ql_log_info, vha, 0x013f, in qlafx00_abort_isp_cleanup()
1367 ha->isp_ops->reset_chip(vha); in qlafx00_abort_isp_cleanup()
1370 if (atomic_read(&vha->loop_state) != LOOP_DOWN) { in qlafx00_abort_isp_cleanup()
1371 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_abort_isp_cleanup()
1372 atomic_set(&vha->loop_down_timer, in qlafx00_abort_isp_cleanup()
1375 if (!atomic_read(&vha->loop_down_timer)) in qlafx00_abort_isp_cleanup()
1376 atomic_set(&vha->loop_down_timer, in qlafx00_abort_isp_cleanup()
1381 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_abort_isp_cleanup()
1389 qla2x00_abort_all_cmds(vha, DID_NO_CONNECT << 16); in qlafx00_abort_isp_cleanup()
1392 qla2x00_abort_all_cmds(vha, DID_RESET << 16); in qlafx00_abort_isp_cleanup()
1396 qla2x00_free_irqs(vha); in qlafx00_abort_isp_cleanup()
1398 set_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1400 set_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1405 ql_log(ql_log_info, vha, 0x0140, in qlafx00_abort_isp_cleanup()
1437 qlafx00_rescan_isp(scsi_qla_host_t *vha) in qlafx00_rescan_isp() argument
1440 struct qla_hw_data *ha = vha->hw; in qlafx00_rescan_isp()
1454 ql_dbg(ql_dbg_disc, vha, 0x2094, in qlafx00_rescan_isp()
1463 status = qla2x00_init_rings(vha); in qlafx00_rescan_isp()
1465 vha->flags.online = 1; in qlafx00_rescan_isp()
1468 if ((vha->device_flags & DFLG_NO_CABLE)) in qlafx00_rescan_isp()
1471 if (qlafx00_fx_disc(vha, in qlafx00_rescan_isp()
1472 &vha->hw->mr.fcport, FXDISC_REG_HOST_INFO)) in qlafx00_rescan_isp()
1473 ql_dbg(ql_dbg_disc, vha, 0x2095, in qlafx00_rescan_isp()
1476 scsi_unblock_requests(vha->host); in qlafx00_rescan_isp()
1481 qlafx00_timer_routine(scsi_qla_host_t *vha) in qlafx00_timer_routine() argument
1483 struct qla_hw_data *ha = vha->hw; in qlafx00_timer_routine()
1494 (!test_bit(UNLOADING, &vha->dpc_flags)) && in qlafx00_timer_routine()
1495 (!test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) && in qlafx00_timer_routine()
1506 &vha->dpc_flags); in qlafx00_timer_routine()
1507 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1515 if (test_bit(FX00_RESET_RECOVERY, &vha->dpc_flags)) { in qlafx00_timer_routine()
1519 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_timer_routine()
1520 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1524 set_bit(FX00_TARGET_SCAN, &vha->dpc_flags); in qlafx00_timer_routine()
1525 clear_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_timer_routine()
1526 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1562 if (test_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags)) { in qlafx00_timer_routine()
1569 ql_dbg(ql_dbg_timer, vha, 0x6012, in qlafx00_timer_routine()
1574 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_timer_routine()
1576 &vha->dpc_flags); in qlafx00_timer_routine()
1577 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1592 set_bit(FX00_HOST_INFO_RESEND, &vha->dpc_flags); in qlafx00_timer_routine()
1595 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1614 qlafx00_reset_initialize(scsi_qla_host_t *vha) in qlafx00_reset_initialize() argument
1616 struct qla_hw_data *ha = vha->hw; in qlafx00_reset_initialize()
1618 if (vha->device_flags & DFLG_DEV_FAILED) { in qlafx00_reset_initialize()
1619 ql_dbg(ql_dbg_init, vha, 0x0142, in qlafx00_reset_initialize()
1626 if (vha->flags.online) { in qlafx00_reset_initialize()
1627 scsi_block_requests(vha->host); in qlafx00_reset_initialize()
1628 qlafx00_abort_isp_cleanup(vha, false); in qlafx00_reset_initialize()
1631 ql_log(ql_log_info, vha, 0x0143, in qlafx00_reset_initialize()
1648 qlafx00_abort_isp(scsi_qla_host_t *vha) in qlafx00_abort_isp() argument
1650 struct qla_hw_data *ha = vha->hw; in qlafx00_abort_isp()
1652 if (vha->flags.online) { in qlafx00_abort_isp()
1655 clear_bit(ISP_ABORT_RETRY, &vha->dpc_flags); in qlafx00_abort_isp()
1659 scsi_block_requests(vha->host); in qlafx00_abort_isp()
1660 qlafx00_abort_isp_cleanup(vha, false); in qlafx00_abort_isp()
1662 scsi_block_requests(vha->host); in qlafx00_abort_isp()
1663 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_abort_isp()
1664 vha->qla_stats.total_isp_aborts++; in qlafx00_abort_isp()
1665 ha->isp_ops->reset_chip(vha); in qlafx00_abort_isp()
1666 set_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp()
1671 ql_log(ql_log_info, vha, 0x0145, in qlafx00_abort_isp()
1678 qlafx00_get_fcport(struct scsi_qla_host *vha, int tgt_id) in qlafx00_get_fcport() argument
1683 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_get_fcport()
1685 ql_dbg(ql_dbg_async, vha, 0x5072, in qlafx00_get_fcport()
1696 qlafx00_tgt_detach(struct scsi_qla_host *vha, int tgt_id) in qlafx00_tgt_detach() argument
1700 ql_log(ql_log_info, vha, 0x5073, in qlafx00_tgt_detach()
1703 fcport = qlafx00_get_fcport(vha, tgt_id); in qlafx00_tgt_detach()
1707 qla2x00_mark_device_lost(vha, fcport, 0, 0); in qlafx00_tgt_detach()
1713 qlafx00_process_aen(struct scsi_qla_host *vha, struct qla_work_evt *evt) in qlafx00_process_aen() argument
1725 if (!vha->flags.fw_tgt_reported) in qlafx00_process_aen()
1726 vha->flags.fw_tgt_reported = 1; in qlafx00_process_aen()
1727 atomic_set(&vha->loop_down_timer, 0); in qlafx00_process_aen()
1728 atomic_set(&vha->loop_state, LOOP_UP); in qlafx00_process_aen()
1729 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_process_aen()
1730 qla2xxx_wake_dpc(vha); in qlafx00_process_aen()
1732 qlafx00_tgt_detach(vha, evt->u.aenfx.mbx[3]); in qlafx00_process_aen()
1736 if (!vha->flags.fw_tgt_reported) in qlafx00_process_aen()
1737 vha->flags.fw_tgt_reported = 1; in qlafx00_process_aen()
1738 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_process_aen()
1740 vha->device_flags |= DFLG_NO_CABLE; in qlafx00_process_aen()
1741 qla2x00_mark_all_devices_lost(vha, 1); in qlafx00_process_aen()
1754 ql_log(ql_log_info, vha, 0x5082, in qlafx00_process_aen()
1758 scsi_block_requests(vha->host); in qlafx00_process_aen()
1759 qlafx00_abort_isp_cleanup(vha, true); in qlafx00_process_aen()
1760 scsi_unblock_requests(vha->host); in qlafx00_process_aen()
1764 fc_host_post_event(vha->host, fc_get_event_number(), in qlafx00_process_aen()
1771 qlafx00_update_host_attr(scsi_qla_host_t *vha, struct port_info_data *pinfo) in qlafx00_update_host_attr() argument
1778 fc_host_node_name(vha->host) = node_name; in qlafx00_update_host_attr()
1779 fc_host_port_name(vha->host) = port_name; in qlafx00_update_host_attr()
1781 vha->hw->current_topology = ISP_CFG_F; in qlafx00_update_host_attr()
1783 atomic_set(&vha->loop_state, LOOP_READY); in qlafx00_update_host_attr()
1785 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_update_host_attr()
1786 vha->hw->link_data_rate = (uint16_t)pinfo->link_config; in qlafx00_update_host_attr()
1808 qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type) in qlafx00_fx_disc() argument
1813 struct qla_hw_data *ha = vha->hw; in qlafx00_fx_disc()
1818 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL); in qlafx00_fx_disc()
1857 ql_log(ql_log_warn, vha, 0x303c, in qlafx00_fx_disc()
1897 ql_dbg(ql_dbg_init, vha, 0x0149, in qlafx00_fx_disc()
1900 ql_dbg(ql_dbg_init, vha, 0x014a, in qlafx00_fx_disc()
1905 ql_dbg(ql_dbg_init, vha, 0x014b, in qlafx00_fx_disc()
1909 ql_dbg(ql_dbg_init, vha, 0x014c, in qlafx00_fx_disc()
1915 ql_dump_buffer(ql_dbg_init + ql_dbg_disc, vha, 0x014d, in qlafx00_fx_disc()
1941 strcpy(vha->hw->model_number, pinfo->model_num); in qlafx00_fx_disc()
1942 strcpy(vha->hw->model_desc, pinfo->model_description); in qlafx00_fx_disc()
1943 memcpy(&vha->hw->mr.symbolic_name, pinfo->symbolic_name, in qlafx00_fx_disc()
1944 sizeof(vha->hw->mr.symbolic_name)); in qlafx00_fx_disc()
1945 memcpy(&vha->hw->mr.serial_num, pinfo->serial_num, in qlafx00_fx_disc()
1946 sizeof(vha->hw->mr.serial_num)); in qlafx00_fx_disc()
1947 memcpy(&vha->hw->mr.hw_version, pinfo->hw_version, in qlafx00_fx_disc()
1948 sizeof(vha->hw->mr.hw_version)); in qlafx00_fx_disc()
1949 memcpy(&vha->hw->mr.fw_version, pinfo->fw_version, in qlafx00_fx_disc()
1950 sizeof(vha->hw->mr.fw_version)); in qlafx00_fx_disc()
1951 strim(vha->hw->mr.fw_version); in qlafx00_fx_disc()
1952 memcpy(&vha->hw->mr.uboot_version, pinfo->uboot_version, in qlafx00_fx_disc()
1953 sizeof(vha->hw->mr.uboot_version)); in qlafx00_fx_disc()
1954 memcpy(&vha->hw->mr.fru_serial_num, pinfo->fru_serial_num, in qlafx00_fx_disc()
1955 sizeof(vha->hw->mr.fru_serial_num)); in qlafx00_fx_disc()
1956 vha->hw->mr.critical_temperature = in qlafx00_fx_disc()
1964 memcpy(vha->node_name, pinfo->node_name, WWN_SIZE); in qlafx00_fx_disc()
1965 memcpy(vha->port_name, pinfo->port_name, WWN_SIZE); in qlafx00_fx_disc()
1966 vha->d_id.b.domain = pinfo->port_id[0]; in qlafx00_fx_disc()
1967 vha->d_id.b.area = pinfo->port_id[1]; in qlafx00_fx_disc()
1968 vha->d_id.b.al_pa = pinfo->port_id[2]; in qlafx00_fx_disc()
1969 qlafx00_update_host_attr(vha, pinfo); in qlafx00_fx_disc()
1970 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0141, in qlafx00_fx_disc()
1978 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0144, in qlafx00_fx_disc()
1983 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0146, in qlafx00_fx_disc()
1985 memcpy(vha->hw->gid_list, pinfo, QLAFX00_TGT_NODE_LIST_SIZE); in qlafx00_fx_disc()
2020 qlafx00_initialize_adapter(scsi_qla_host_t *vha) in qlafx00_initialize_adapter() argument
2023 struct qla_hw_data *ha = vha->hw; in qlafx00_initialize_adapter()
2027 vha->flags.online = 0; in qlafx00_initialize_adapter()
2029 vha->flags.reset_active = 0; in qlafx00_initialize_adapter()
2032 atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME); in qlafx00_initialize_adapter()
2033 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_initialize_adapter()
2034 vha->device_flags = DFLG_NO_CABLE; in qlafx00_initialize_adapter()
2035 vha->dpc_flags = 0; in qlafx00_initialize_adapter()
2036 vha->flags.management_server_logged_in = 0; in qlafx00_initialize_adapter()
2043 ql_dbg(ql_dbg_init, vha, 0x0147, in qlafx00_initialize_adapter()
2046 rval = ha->isp_ops->pci_config(vha); in qlafx00_initialize_adapter()
2048 ql_log(ql_log_warn, vha, 0x0148, in qlafx00_initialize_adapter()
2053 rval = qlafx00_init_fw_ready(vha); in qlafx00_initialize_adapter()
2057 qlafx00_save_queue_ptrs(vha); in qlafx00_initialize_adapter()
2059 rval = qlafx00_config_queues(vha); in qlafx00_initialize_adapter()
2067 rval = qla2x00_alloc_outstanding_cmds(ha, vha->req); in qlafx00_initialize_adapter()
2071 rval = qla2x00_init_rings(vha); in qlafx00_initialize_adapter()
2075 ql_dbg(ql_dbg_init, vha, 0x0152, in qlafx00_initialize_adapter()
2086 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); in qlafx00_fw_state_show() local
2090 if (qla2x00_reset_active(vha)) in qlafx00_fw_state_show()
2091 ql_log(ql_log_warn, vha, 0x70ce, in qlafx00_fw_state_show()
2093 else if (!vha->hw->flags.eeh_busy) { in qlafx00_fw_state_show()
2094 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_fw_state_show()
2132 struct scsi_qla_host *vha = sp->vha; in qlafx00_handle_sense() local
2156 ql_dbg(ql_dbg_io, vha, 0x304d, in qlafx00_handle_sense()
2165 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3039, in qlafx00_handle_sense()
2167 sp->vha->host_no, cp->device->id, cp->device->lun, in qlafx00_handle_sense()
2169 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x3049, in qlafx00_handle_sense()
2175 qlafx00_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_tm_iocb_entry() argument
2190 qlafx00_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_abort_iocb_entry() argument
2197 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_abort_iocb_entry()
2207 qlafx00_ioctl_iosb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_ioctl_iosb_entry() argument
2219 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_ioctl_iosb_entry()
2257 sp->fcport->vha, 0x5080, in qlafx00_ioctl_iosb_entry()
2261 sp->fcport->vha, 0x5074, in qlafx00_ioctl_iosb_entry()
2278 qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) in qlafx00_status_entry() argument
2291 struct qla_hw_data *ha = vha->hw; in qlafx00_status_entry()
2315 ql_dbg(ql_dbg_io, vha, 0x3034, in qlafx00_status_entry()
2318 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_status_entry()
2319 qla2xxx_wake_dpc(vha); in qlafx00_status_entry()
2325 qlafx00_tm_iocb_entry(vha, req, pkt, sp, in qlafx00_status_entry()
2332 qla2x00_process_completed_request(vha, req, handle); in qlafx00_status_entry()
2339 ql_dbg(ql_dbg_io, vha, 0x3048, in qlafx00_status_entry()
2385 ql_dbg(ql_dbg_io, fcport->vha, 0x3050, in qlafx00_status_entry()
2398 ql_dbg(ql_dbg_io, fcport->vha, 0x3051, in qlafx00_status_entry()
2424 ql_dbg(ql_dbg_io, fcport->vha, 0x3052, in qlafx00_status_entry()
2437 ql_dbg(ql_dbg_io, fcport->vha, 0x3053, in qlafx00_status_entry()
2454 ql_dbg(ql_dbg_io, fcport->vha, 0x3054, in qlafx00_status_entry()
2462 ql_dbg(ql_dbg_io, fcport->vha, 0x3055, in qlafx00_status_entry()
2478 ql_dbg(ql_dbg_io, fcport->vha, 0x3056, in qlafx00_status_entry()
2512 ql_dbg(ql_dbg_io, fcport->vha, 0x3057, in qlafx00_status_entry()
2517 qla2x00_mark_device_lost(fcport->vha, fcport, 1, 1); in qlafx00_status_entry()
2530 ql_dbg(ql_dbg_io, fcport->vha, 0x3058, in qlafx00_status_entry()
2535 comp_status, scsi_status, res, vha->host_no, in qlafx00_status_entry()
2557 struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); in qlafx00_status_cont_entry() local
2564 ql_dbg(ql_dbg_io, vha, 0x3037, in qlafx00_status_cont_entry()
2570 ql_dbg(ql_dbg_io, vha, 0x304b, in qlafx00_status_cont_entry()
2576 ql_log(ql_log_warn, vha, 0x303b, in qlafx00_status_cont_entry()
2584 ql_dbg(ql_dbg_io, vha, 0x304c, in qlafx00_status_cont_entry()
2589 ql_dbg(ql_dbg_io, vha, 0x304f, in qlafx00_status_cont_entry()
2599 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x304e, in qlafx00_status_cont_entry()
2602 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x304a, in qlafx00_status_cont_entry()
2630 qlafx00_multistatus_entry(struct scsi_qla_host *vha, in qlafx00_multistatus_entry() argument
2635 struct qla_hw_data *ha = vha->hw; in qlafx00_multistatus_entry()
2646 ql_dbg(ql_dbg_io, vha, 0x3035, in qlafx00_multistatus_entry()
2648 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_multistatus_entry()
2649 qla2xxx_wake_dpc(vha); in qlafx00_multistatus_entry()
2668 ql_dbg(ql_dbg_io, vha, 0x3044, in qlafx00_multistatus_entry()
2670 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_multistatus_entry()
2671 qla2xxx_wake_dpc(vha); in qlafx00_multistatus_entry()
2674 qla2x00_process_completed_request(vha, req, handle); in qlafx00_multistatus_entry()
2688 qlafx00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, in qlafx00_error_entry() argument
2692 struct qla_hw_data *ha = vha->hw; in qlafx00_error_entry()
2698 ql_dbg(ql_dbg_async, vha, 0x507f, in qlafx00_error_entry()
2703 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_error_entry()
2709 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_error_entry()
2710 qla2xxx_wake_dpc(vha); in qlafx00_error_entry()
2719 qlafx00_process_response_queue(struct scsi_qla_host *vha, in qlafx00_process_response_queue() argument
2748 qlafx00_error_entry(vha, rsp, in qlafx00_process_response_queue()
2756 qlafx00_status_entry(vha, rsp, pkt); in qlafx00_process_response_queue()
2764 qlafx00_multistatus_entry(vha, rsp, pkt); in qlafx00_process_response_queue()
2768 qlafx00_abort_iocb_entry(vha, rsp->req, in qlafx00_process_response_queue()
2773 qlafx00_ioctl_iosb_entry(vha, rsp->req, in qlafx00_process_response_queue()
2778 ql_dbg(ql_dbg_async, vha, 0x5081, in qlafx00_process_response_queue()
2795 qlafx00_async_event(scsi_qla_host_t *vha) in qlafx00_async_event() argument
2797 struct qla_hw_data *ha = vha->hw; in qlafx00_async_event()
2805 ql_log(ql_log_warn, vha, 0x5079, in qlafx00_async_event()
2807 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_async_event()
2811 ql_dbg(ql_dbg_async, vha, 0x5076, in qlafx00_async_event()
2813 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_async_event()
2814 qla2xxx_wake_dpc(vha); in qlafx00_async_event()
2821 ql_dbg(ql_dbg_async, vha, 0x5077, in qlafx00_async_event()
2829 ql_log(ql_log_info, vha, 0x5085, in qlafx00_async_event()
2836 ql_log(ql_log_info, vha, 0x5086, in qlafx00_async_event()
2843 ql_log(ql_log_info, vha, 0x5083, in qlafx00_async_event()
2857 ql_dbg(ql_dbg_async, vha, 0x5078, in qlafx00_async_event()
2863 qlafx00_post_aenfx_work(vha, ha->aenmb[0], in qlafx00_async_event()
2873 qlafx00_mbx_completion(scsi_qla_host_t *vha, uint32_t mb0) in qlafx00_mbx_completion() argument
2877 struct qla_hw_data *ha = vha->hw; in qlafx00_mbx_completion()
2881 ql_dbg(ql_dbg_async, vha, 0x507e, "MBX pointer ERROR.\n"); in qlafx00_mbx_completion()
2906 scsi_qla_host_t *vha; in qlafx00_intr_handler() local
2933 vha = pci_get_drvdata(ha->pdev); in qlafx00_intr_handler()
2936 if (qla2x00_check_reg32_for_disconnect(vha, stat)) in qlafx00_intr_handler()
2944 qlafx00_mbx_completion(vha, mb[0]); in qlafx00_intr_handler()
2950 qlafx00_async_event(vha); in qlafx00_intr_handler()
2954 qlafx00_process_response_queue(vha, rsp); in qlafx00_intr_handler()
2999 scsi_qla_host_t *vha; in qlafx00_build_scsi_iocbs() local
3007 vha = sp->vha; in qlafx00_build_scsi_iocbs()
3008 req = vha->req; in qlafx00_build_scsi_iocbs()
3026 vha->qla_stats.output_bytes += scsi_bufflen(cmd); in qlafx00_build_scsi_iocbs()
3029 vha->qla_stats.input_bytes += scsi_bufflen(cmd); in qlafx00_build_scsi_iocbs()
3091 struct scsi_qla_host *vha = sp->vha; in qlafx00_start_scsi() local
3092 struct qla_hw_data *ha = vha->hw; in qlafx00_start_scsi()
3099 req = vha->req; in qlafx00_start_scsi()
3129 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); in qlafx00_start_scsi()
3177 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302e, in qlafx00_start_scsi()
3179 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x3032, in qlafx00_start_scsi()
3215 scsi_qla_host_t *vha = sp->vha; in qlafx00_tm_iocb() local
3216 struct req_que *req = vha->req; in qlafx00_tm_iocb()
3242 scsi_qla_host_t *vha = sp->vha; in qlafx00_abort_iocb() local
3243 struct req_que *req = vha->req; in qlafx00_abort_iocb()
3356 sp->vha->req, &lcont_pkt); in qlafx00_fxdisc_iocb()
3377 sp->vha, 0x3042, in qlafx00_fxdisc_iocb()
3386 sp->vha, 0x3043, in qlafx00_fxdisc_iocb()
3418 sp->vha->req, &lcont_pkt); in qlafx00_fxdisc_iocb()
3439 sp->vha, 0x3045, in qlafx00_fxdisc_iocb()
3448 sp->vha, 0x3046, in qlafx00_fxdisc_iocb()
3460 sp->vha, 0x3047, in qlafx00_fxdisc_iocb()