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()
61 if (vha->device_flags & DFLG_DEV_FAILED) { in qlafx00_mailbox_command()
62 ql_log(ql_log_warn, vha, 0x115f, in qlafx00_mailbox_command()
74 ql_log(ql_log_warn, vha, 0x1175, in qlafx00_mailbox_command()
82 ql_log(ql_log_warn, vha, 0x1176, in qlafx00_mailbox_command()
95 ql_log(ql_log_warn, vha, 0x1177, in qlafx00_mailbox_command()
105 ql_dbg(ql_dbg_mbx, vha, 0x1178, in qlafx00_mailbox_command()
130 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1172, in qlafx00_mailbox_command()
132 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1173, in qlafx00_mailbox_command()
134 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1174, in qlafx00_mailbox_command()
138 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()
641 qlafx00_soc_cpu_reset(vha); in qlafx00_soft_reset()
653 qlafx00_chip_diag(scsi_qla_host_t *vha) in qlafx00_chip_diag() argument
656 struct qla_hw_data *ha = vha->hw; in qlafx00_chip_diag()
661 rval = qlafx00_mbx_reg_test(vha); in qlafx00_chip_diag()
663 ql_log(ql_log_warn, vha, 0x1165, in qlafx00_chip_diag()
673 qlafx00_config_rings(struct scsi_qla_host *vha) in qlafx00_config_rings() argument
675 struct qla_hw_data *ha = vha->hw; in qlafx00_config_rings()
689 qlafx00_pci_info_str(struct scsi_qla_host *vha, char *str, size_t str_len) in qlafx00_pci_info_str() argument
691 struct qla_hw_data *ha = vha->hw; in qlafx00_pci_info_str()
699 qlafx00_fw_version_str(struct scsi_qla_host *vha, char *str, size_t size) in qlafx00_fw_version_str() argument
701 struct qla_hw_data *ha = vha->hw; in qlafx00_fw_version_str()
809 qlafx00_save_queue_ptrs(struct scsi_qla_host *vha) in qlafx00_save_queue_ptrs() argument
811 struct qla_hw_data *ha = vha->hw; in qlafx00_save_queue_ptrs()
823 ql_dbg(ql_dbg_init, vha, 0x012d, in qlafx00_save_queue_ptrs()
828 ql_dbg(ql_dbg_init, vha, 0x012e, in qlafx00_save_queue_ptrs()
835 qlafx00_config_queues(struct scsi_qla_host *vha) in qlafx00_config_queues() argument
837 struct qla_hw_data *ha = vha->hw; in qlafx00_config_queues()
851 ql_dbg(ql_dbg_init, vha, 0x0130, in qlafx00_config_queues()
866 ql_dbg(ql_dbg_init, vha, 0x0132, in qlafx00_config_queues()
876 qlafx00_init_fw_ready(scsi_qla_host_t *vha) in qlafx00_init_fw_ready() argument
881 struct qla_hw_data *ha = vha->hw; in qlafx00_init_fw_ready()
896 rval = qlafx00_driver_shutdown(vha, 10); in qlafx00_init_fw_ready()
898 qlafx00_soft_reset(vha); in qlafx00_init_fw_ready()
906 ql_dbg(ql_dbg_mbx, vha, 0x0133, in qlafx00_init_fw_ready()
918 qlafx00_soft_reset(vha); in qlafx00_init_fw_ready()
932 ql_dbg(ql_dbg_init, vha, 0x0134, in qlafx00_init_fw_ready()
968 ql_dbg(ql_dbg_init, vha, 0x0135, in qlafx00_init_fw_ready()
975 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_init_fw_ready()
994 ql_dbg(ql_dbg_init, vha, 0x0136, in qlafx00_init_fw_ready()
998 rval = qlafx00_driver_shutdown(vha, 10); in qlafx00_init_fw_ready()
1011 ql_dbg(ql_dbg_init, vha, 0x0137, in qlafx00_init_fw_ready()
1024 ql_dbg(ql_dbg_init, vha, 0x0138, in qlafx00_init_fw_ready()
1027 ql_dbg(ql_dbg_init, vha, 0x0139, in qlafx00_init_fw_ready()
1040 qlafx00_fw_ready(scsi_qla_host_t *vha) in qlafx00_fw_ready() argument
1055 if (!vha->flags.init_done) in qlafx00_fw_ready()
1056 ql_dbg(ql_dbg_init, vha, 0x013a, in qlafx00_fw_ready()
1060 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_fw_ready()
1064 ql_dbg(ql_dbg_init, vha, 0x013b, in qlafx00_fw_ready()
1078 ql_dbg(ql_dbg_init, vha, 0x013c, in qlafx00_fw_ready()
1084 ql_dbg(ql_dbg_init, vha, 0x013d, in qlafx00_fw_ready()
1087 ql_dbg(ql_dbg_init, vha, 0x013e, in qlafx00_fw_ready()
1094 qlafx00_find_all_targets(scsi_qla_host_t *vha, in qlafx00_find_all_targets() argument
1101 struct qla_hw_data *ha = vha->hw; in qlafx00_find_all_targets()
1105 if (!test_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags)) in qlafx00_find_all_targets()
1108 if ((atomic_read(&vha->loop_down_timer) || in qlafx00_find_all_targets()
1109 STATE_TRANSITION(vha))) { in qlafx00_find_all_targets()
1110 atomic_set(&vha->loop_down_timer, 0); in qlafx00_find_all_targets()
1111 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_find_all_targets()
1115 ql_dbg(ql_dbg_disc + ql_dbg_init, vha, 0x2088, in qlafx00_find_all_targets()
1117 ql_dump_buffer(ql_dbg_disc + ql_dbg_init, vha, 0x2089, in qlafx00_find_all_targets()
1121 new_fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlafx00_find_all_targets()
1130 rval = qlafx00_fx_disc(vha, new_fcport, in qlafx00_find_all_targets()
1133 ql_log(ql_log_warn, vha, 0x208a, in qlafx00_find_all_targets()
1141 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_find_all_targets()
1159 ql_dbg(ql_dbg_disc + ql_dbg_init, vha, 0x208b, in qlafx00_find_all_targets()
1168 ql_log(ql_log_info, vha, 0x208c, in qlafx00_find_all_targets()
1180 ql_log(ql_log_info, vha, 0x208d, in qlafx00_find_all_targets()
1182 qla2x00_update_fcport(vha, fcport); in qlafx00_find_all_targets()
1184 ql_log(ql_log_info, vha, 0x208e, in qlafx00_find_all_targets()
1188 qla2x00_mark_device_lost(vha, fcport, 0); in qlafx00_find_all_targets()
1189 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_find_all_targets()
1203 new_fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); in qlafx00_find_all_targets()
1224 qlafx00_configure_all_targets(scsi_qla_host_t *vha) in qlafx00_configure_all_targets() argument
1230 rval = qlafx00_fx_disc(vha, &vha->hw->mr.fcport, in qlafx00_configure_all_targets()
1233 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_configure_all_targets()
1237 rval = qlafx00_find_all_targets(vha, &new_fcports); in qlafx00_configure_all_targets()
1239 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_configure_all_targets()
1246 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_configure_all_targets()
1247 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) in qlafx00_configure_all_targets()
1252 qla2x00_mark_device_lost(vha, fcport, 0); in qlafx00_configure_all_targets()
1260 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) in qlafx00_configure_all_targets()
1263 qla2x00_update_fcport(vha, fcport); in qlafx00_configure_all_targets()
1264 list_move_tail(&fcport->list, &vha->vp_fcports); in qlafx00_configure_all_targets()
1265 ql_log(ql_log_info, vha, 0x208f, in qlafx00_configure_all_targets()
1295 qlafx00_configure_devices(scsi_qla_host_t *vha) in qlafx00_configure_devices() argument
1302 flags = vha->dpc_flags; in qlafx00_configure_devices()
1304 ql_dbg(ql_dbg_disc, vha, 0x2090, in qlafx00_configure_devices()
1307 rval = qlafx00_configure_all_targets(vha); in qlafx00_configure_devices()
1310 if (test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) { in qlafx00_configure_devices()
1313 atomic_set(&vha->loop_state, LOOP_READY); in qlafx00_configure_devices()
1314 ql_log(ql_log_info, vha, 0x2091, in qlafx00_configure_devices()
1320 ql_dbg(ql_dbg_disc, vha, 0x2092, in qlafx00_configure_devices()
1323 ql_dbg(ql_dbg_disc, vha, 0x2093, in qlafx00_configure_devices()
1330 qlafx00_abort_isp_cleanup(scsi_qla_host_t *vha, bool critemp) in qlafx00_abort_isp_cleanup() argument
1332 struct qla_hw_data *ha = vha->hw; in qlafx00_abort_isp_cleanup()
1335 vha->flags.online = 0; in qlafx00_abort_isp_cleanup()
1340 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1341 vha->qla_stats.total_isp_aborts++; in qlafx00_abort_isp_cleanup()
1342 ql_log(ql_log_info, vha, 0x013f, in qlafx00_abort_isp_cleanup()
1344 ha->isp_ops->reset_chip(vha); in qlafx00_abort_isp_cleanup()
1347 if (atomic_read(&vha->loop_state) != LOOP_DOWN) { in qlafx00_abort_isp_cleanup()
1348 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_abort_isp_cleanup()
1349 atomic_set(&vha->loop_down_timer, in qlafx00_abort_isp_cleanup()
1352 if (!atomic_read(&vha->loop_down_timer)) in qlafx00_abort_isp_cleanup()
1353 atomic_set(&vha->loop_down_timer, in qlafx00_abort_isp_cleanup()
1358 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_abort_isp_cleanup()
1366 qla2x00_abort_all_cmds(vha, DID_NO_CONNECT << 16); in qlafx00_abort_isp_cleanup()
1369 qla2x00_abort_all_cmds(vha, DID_RESET << 16); in qlafx00_abort_isp_cleanup()
1373 qla2x00_free_irqs(vha); in qlafx00_abort_isp_cleanup()
1375 set_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1377 set_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp_cleanup()
1382 ql_log(ql_log_info, vha, 0x0140, in qlafx00_abort_isp_cleanup()
1414 qlafx00_rescan_isp(scsi_qla_host_t *vha) in qlafx00_rescan_isp() argument
1417 struct qla_hw_data *ha = vha->hw; in qlafx00_rescan_isp()
1431 ql_dbg(ql_dbg_disc, vha, 0x2094, in qlafx00_rescan_isp()
1440 status = qla2x00_init_rings(vha); in qlafx00_rescan_isp()
1442 vha->flags.online = 1; in qlafx00_rescan_isp()
1445 if ((vha->device_flags & DFLG_NO_CABLE)) in qlafx00_rescan_isp()
1448 if (qlafx00_fx_disc(vha, in qlafx00_rescan_isp()
1449 &vha->hw->mr.fcport, FXDISC_REG_HOST_INFO)) in qlafx00_rescan_isp()
1450 ql_dbg(ql_dbg_disc, vha, 0x2095, in qlafx00_rescan_isp()
1453 scsi_unblock_requests(vha->host); in qlafx00_rescan_isp()
1458 qlafx00_timer_routine(scsi_qla_host_t *vha) in qlafx00_timer_routine() argument
1460 struct qla_hw_data *ha = vha->hw; in qlafx00_timer_routine()
1471 (!test_bit(UNLOADING, &vha->dpc_flags)) && in qlafx00_timer_routine()
1472 (!test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) && in qlafx00_timer_routine()
1483 &vha->dpc_flags); in qlafx00_timer_routine()
1484 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1492 if (test_bit(FX00_RESET_RECOVERY, &vha->dpc_flags)) { in qlafx00_timer_routine()
1496 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_timer_routine()
1497 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1501 set_bit(FX00_TARGET_SCAN, &vha->dpc_flags); in qlafx00_timer_routine()
1502 clear_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_timer_routine()
1503 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1539 if (test_bit(FX00_CRITEMP_RECOVERY, &vha->dpc_flags)) { in qlafx00_timer_routine()
1546 ql_dbg(ql_dbg_timer, vha, 0x6012, in qlafx00_timer_routine()
1551 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_timer_routine()
1553 &vha->dpc_flags); in qlafx00_timer_routine()
1554 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1569 set_bit(FX00_HOST_INFO_RESEND, &vha->dpc_flags); in qlafx00_timer_routine()
1572 qla2xxx_wake_dpc(vha); in qlafx00_timer_routine()
1591 qlafx00_reset_initialize(scsi_qla_host_t *vha) in qlafx00_reset_initialize() argument
1593 struct qla_hw_data *ha = vha->hw; in qlafx00_reset_initialize()
1595 if (vha->device_flags & DFLG_DEV_FAILED) { in qlafx00_reset_initialize()
1596 ql_dbg(ql_dbg_init, vha, 0x0142, in qlafx00_reset_initialize()
1603 if (vha->flags.online) { in qlafx00_reset_initialize()
1604 scsi_block_requests(vha->host); in qlafx00_reset_initialize()
1605 qlafx00_abort_isp_cleanup(vha, false); in qlafx00_reset_initialize()
1608 ql_log(ql_log_info, vha, 0x0143, in qlafx00_reset_initialize()
1625 qlafx00_abort_isp(scsi_qla_host_t *vha) in qlafx00_abort_isp() argument
1627 struct qla_hw_data *ha = vha->hw; in qlafx00_abort_isp()
1629 if (vha->flags.online) { in qlafx00_abort_isp()
1632 clear_bit(ISP_ABORT_RETRY, &vha->dpc_flags); in qlafx00_abort_isp()
1636 scsi_block_requests(vha->host); in qlafx00_abort_isp()
1637 qlafx00_abort_isp_cleanup(vha, false); in qlafx00_abort_isp()
1639 scsi_block_requests(vha->host); in qlafx00_abort_isp()
1640 clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_abort_isp()
1641 vha->qla_stats.total_isp_aborts++; in qlafx00_abort_isp()
1642 ha->isp_ops->reset_chip(vha); in qlafx00_abort_isp()
1643 set_bit(FX00_RESET_RECOVERY, &vha->dpc_flags); in qlafx00_abort_isp()
1648 ql_log(ql_log_info, vha, 0x0145, in qlafx00_abort_isp()
1655 qlafx00_get_fcport(struct scsi_qla_host *vha, int tgt_id) in qlafx00_get_fcport() argument
1660 list_for_each_entry(fcport, &vha->vp_fcports, list) { in qlafx00_get_fcport()
1662 ql_dbg(ql_dbg_async, vha, 0x5072, in qlafx00_get_fcport()
1673 qlafx00_tgt_detach(struct scsi_qla_host *vha, int tgt_id) in qlafx00_tgt_detach() argument
1677 ql_log(ql_log_info, vha, 0x5073, in qlafx00_tgt_detach()
1680 fcport = qlafx00_get_fcport(vha, tgt_id); in qlafx00_tgt_detach()
1684 qla2x00_mark_device_lost(vha, fcport, 0); in qlafx00_tgt_detach()
1690 qlafx00_process_aen(struct scsi_qla_host *vha, struct qla_work_evt *evt) in qlafx00_process_aen() argument
1701 if (!vha->flags.fw_tgt_reported) in qlafx00_process_aen()
1702 vha->flags.fw_tgt_reported = 1; in qlafx00_process_aen()
1703 atomic_set(&vha->loop_down_timer, 0); in qlafx00_process_aen()
1704 atomic_set(&vha->loop_state, LOOP_UP); in qlafx00_process_aen()
1705 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_process_aen()
1706 qla2xxx_wake_dpc(vha); in qlafx00_process_aen()
1708 qlafx00_tgt_detach(vha, evt->u.aenfx.mbx[3]); in qlafx00_process_aen()
1712 if (!vha->flags.fw_tgt_reported) in qlafx00_process_aen()
1713 vha->flags.fw_tgt_reported = 1; in qlafx00_process_aen()
1714 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); in qlafx00_process_aen()
1716 vha->device_flags |= DFLG_NO_CABLE; in qlafx00_process_aen()
1717 qla2x00_mark_all_devices_lost(vha); in qlafx00_process_aen()
1730 ql_log(ql_log_info, vha, 0x5082, in qlafx00_process_aen()
1734 scsi_block_requests(vha->host); in qlafx00_process_aen()
1735 qlafx00_abort_isp_cleanup(vha, true); in qlafx00_process_aen()
1736 scsi_unblock_requests(vha->host); in qlafx00_process_aen()
1740 fc_host_post_event(vha->host, fc_get_event_number(), in qlafx00_process_aen()
1745 qlafx00_update_host_attr(scsi_qla_host_t *vha, struct port_info_data *pinfo) in qlafx00_update_host_attr() argument
1752 fc_host_node_name(vha->host) = node_name; in qlafx00_update_host_attr()
1753 fc_host_port_name(vha->host) = port_name; in qlafx00_update_host_attr()
1755 vha->hw->current_topology = ISP_CFG_F; in qlafx00_update_host_attr()
1757 atomic_set(&vha->loop_state, LOOP_READY); in qlafx00_update_host_attr()
1759 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_update_host_attr()
1760 vha->hw->link_data_rate = (uint16_t)pinfo->link_config; in qlafx00_update_host_attr()
1780 qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type) in qlafx00_fx_disc() argument
1785 struct qla_hw_data *ha = vha->hw; in qlafx00_fx_disc()
1791 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL); in qlafx00_fx_disc()
1830 ql_log(ql_log_warn, vha, 0x303c, in qlafx00_fx_disc()
1870 ql_dbg(ql_dbg_init, vha, 0x0149, in qlafx00_fx_disc()
1873 ql_dbg(ql_dbg_init, vha, 0x014a, in qlafx00_fx_disc()
1878 ql_dbg(ql_dbg_init, vha, 0x014b, in qlafx00_fx_disc()
1882 ql_dbg(ql_dbg_init, vha, 0x014c, in qlafx00_fx_disc()
1888 ql_dump_buffer(ql_dbg_init + ql_dbg_disc, vha, 0x014d, in qlafx00_fx_disc()
1912 strlcpy(vha->hw->model_number, pinfo->model_num, in qlafx00_fx_disc()
1913 ARRAY_SIZE(vha->hw->model_number)); in qlafx00_fx_disc()
1914 strlcpy(vha->hw->model_desc, pinfo->model_description, in qlafx00_fx_disc()
1915 ARRAY_SIZE(vha->hw->model_desc)); in qlafx00_fx_disc()
1916 memcpy(&vha->hw->mr.symbolic_name, pinfo->symbolic_name, in qlafx00_fx_disc()
1917 sizeof(vha->hw->mr.symbolic_name)); in qlafx00_fx_disc()
1918 memcpy(&vha->hw->mr.serial_num, pinfo->serial_num, in qlafx00_fx_disc()
1919 sizeof(vha->hw->mr.serial_num)); in qlafx00_fx_disc()
1920 memcpy(&vha->hw->mr.hw_version, pinfo->hw_version, in qlafx00_fx_disc()
1921 sizeof(vha->hw->mr.hw_version)); in qlafx00_fx_disc()
1922 memcpy(&vha->hw->mr.fw_version, pinfo->fw_version, in qlafx00_fx_disc()
1923 sizeof(vha->hw->mr.fw_version)); in qlafx00_fx_disc()
1924 strim(vha->hw->mr.fw_version); in qlafx00_fx_disc()
1925 memcpy(&vha->hw->mr.uboot_version, pinfo->uboot_version, in qlafx00_fx_disc()
1926 sizeof(vha->hw->mr.uboot_version)); in qlafx00_fx_disc()
1927 memcpy(&vha->hw->mr.fru_serial_num, pinfo->fru_serial_num, in qlafx00_fx_disc()
1928 sizeof(vha->hw->mr.fru_serial_num)); in qlafx00_fx_disc()
1929 vha->hw->mr.critical_temperature = in qlafx00_fx_disc()
1937 memcpy(vha->node_name, pinfo->node_name, WWN_SIZE); in qlafx00_fx_disc()
1938 memcpy(vha->port_name, pinfo->port_name, WWN_SIZE); in qlafx00_fx_disc()
1939 vha->d_id.b.domain = pinfo->port_id[0]; in qlafx00_fx_disc()
1940 vha->d_id.b.area = pinfo->port_id[1]; in qlafx00_fx_disc()
1941 vha->d_id.b.al_pa = pinfo->port_id[2]; in qlafx00_fx_disc()
1942 qlafx00_update_host_attr(vha, pinfo); in qlafx00_fx_disc()
1943 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0141, in qlafx00_fx_disc()
1951 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0144, in qlafx00_fx_disc()
1956 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0146, in qlafx00_fx_disc()
1958 memcpy(vha->hw->gid_list, pinfo, QLAFX00_TGT_NODE_LIST_SIZE); in qlafx00_fx_disc()
1994 qlafx00_initialize_adapter(scsi_qla_host_t *vha) in qlafx00_initialize_adapter() argument
1997 struct qla_hw_data *ha = vha->hw; in qlafx00_initialize_adapter()
2001 vha->flags.online = 0; in qlafx00_initialize_adapter()
2003 vha->flags.reset_active = 0; in qlafx00_initialize_adapter()
2006 atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME); in qlafx00_initialize_adapter()
2007 atomic_set(&vha->loop_state, LOOP_DOWN); in qlafx00_initialize_adapter()
2008 vha->device_flags = DFLG_NO_CABLE; in qlafx00_initialize_adapter()
2009 vha->dpc_flags = 0; in qlafx00_initialize_adapter()
2010 vha->flags.management_server_logged_in = 0; in qlafx00_initialize_adapter()
2017 ql_dbg(ql_dbg_init, vha, 0x0147, in qlafx00_initialize_adapter()
2020 rval = ha->isp_ops->pci_config(vha); in qlafx00_initialize_adapter()
2022 ql_log(ql_log_warn, vha, 0x0148, in qlafx00_initialize_adapter()
2027 rval = qlafx00_init_fw_ready(vha); in qlafx00_initialize_adapter()
2031 qlafx00_save_queue_ptrs(vha); in qlafx00_initialize_adapter()
2033 rval = qlafx00_config_queues(vha); in qlafx00_initialize_adapter()
2041 rval = qla2x00_alloc_outstanding_cmds(ha, vha->req); in qlafx00_initialize_adapter()
2045 rval = qla2x00_init_rings(vha); in qlafx00_initialize_adapter()
2049 ql_dbg(ql_dbg_init, vha, 0x0152, in qlafx00_initialize_adapter()
2060 scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); in qlafx00_fw_state_show() local
2064 if (qla2x00_reset_active(vha)) in qlafx00_fw_state_show()
2065 ql_log(ql_log_warn, vha, 0x70ce, in qlafx00_fw_state_show()
2067 else if (!vha->hw->flags.eeh_busy) { in qlafx00_fw_state_show()
2068 rval = qlafx00_get_firmware_state(vha, state); in qlafx00_fw_state_show()
2106 struct scsi_qla_host *vha = sp->vha; in qlafx00_handle_sense() local
2130 ql_dbg(ql_dbg_io, vha, 0x304d, in qlafx00_handle_sense()
2139 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3039, in qlafx00_handle_sense()
2141 sp->vha->host_no, cp->device->id, cp->device->lun, in qlafx00_handle_sense()
2143 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x3049, in qlafx00_handle_sense()
2149 qlafx00_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_tm_iocb_entry() argument
2164 qlafx00_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_abort_iocb_entry() argument
2171 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_abort_iocb_entry()
2181 qlafx00_ioctl_iosb_entry(scsi_qla_host_t *vha, struct req_que *req, in qlafx00_ioctl_iosb_entry() argument
2193 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_ioctl_iosb_entry()
2230 sp->vha, 0x5080, pkt, sizeof(*pkt)); in qlafx00_ioctl_iosb_entry()
2233 sp->vha, 0x5074, in qlafx00_ioctl_iosb_entry()
2250 qlafx00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) in qlafx00_status_entry() argument
2263 struct qla_hw_data *ha = vha->hw; in qlafx00_status_entry()
2287 ql_dbg(ql_dbg_io, vha, 0x3034, in qlafx00_status_entry()
2290 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_status_entry()
2291 qla2xxx_wake_dpc(vha); in qlafx00_status_entry()
2297 qlafx00_tm_iocb_entry(vha, req, pkt, sp, in qlafx00_status_entry()
2304 qla2x00_process_completed_request(vha, req, handle); in qlafx00_status_entry()
2311 ql_dbg(ql_dbg_io, vha, 0x3048, in qlafx00_status_entry()
2357 ql_dbg(ql_dbg_io, fcport->vha, 0x3050, in qlafx00_status_entry()
2370 ql_dbg(ql_dbg_io, fcport->vha, 0x3051, in qlafx00_status_entry()
2396 ql_dbg(ql_dbg_io, fcport->vha, 0x3052, in qlafx00_status_entry()
2409 ql_dbg(ql_dbg_io, fcport->vha, 0x3053, in qlafx00_status_entry()
2426 ql_dbg(ql_dbg_io, fcport->vha, 0x3054, in qlafx00_status_entry()
2434 ql_dbg(ql_dbg_io, fcport->vha, 0x3055, in qlafx00_status_entry()
2450 ql_dbg(ql_dbg_io, fcport->vha, 0x3056, in qlafx00_status_entry()
2484 ql_dbg(ql_dbg_io, fcport->vha, 0x3057, in qlafx00_status_entry()
2489 qla2x00_mark_device_lost(fcport->vha, fcport, 1); in qlafx00_status_entry()
2502 ql_dbg(ql_dbg_io, fcport->vha, 0x3058, in qlafx00_status_entry()
2507 comp_status, scsi_status, res, vha->host_no, in qlafx00_status_entry()
2531 struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev); in qlafx00_status_cont_entry() local
2538 ql_dbg(ql_dbg_io, vha, 0x3037, in qlafx00_status_cont_entry()
2544 ql_dbg(ql_dbg_io, vha, 0x304b, in qlafx00_status_cont_entry()
2550 ql_log(ql_log_warn, vha, 0x303b, in qlafx00_status_cont_entry()
2558 ql_dbg(ql_dbg_io, vha, 0x304c, in qlafx00_status_cont_entry()
2563 ql_dbg(ql_dbg_io, vha, 0x304f, in qlafx00_status_cont_entry()
2573 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x304e, in qlafx00_status_cont_entry()
2576 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x304a, in qlafx00_status_cont_entry()
2606 qlafx00_multistatus_entry(struct scsi_qla_host *vha, in qlafx00_multistatus_entry() argument
2611 struct qla_hw_data *ha = vha->hw; in qlafx00_multistatus_entry()
2622 ql_dbg(ql_dbg_io, vha, 0x3035, in qlafx00_multistatus_entry()
2624 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_multistatus_entry()
2625 qla2xxx_wake_dpc(vha); in qlafx00_multistatus_entry()
2644 ql_dbg(ql_dbg_io, vha, 0x3044, in qlafx00_multistatus_entry()
2646 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_multistatus_entry()
2647 qla2xxx_wake_dpc(vha); in qlafx00_multistatus_entry()
2650 qla2x00_process_completed_request(vha, req, handle); in qlafx00_multistatus_entry()
2662 qlafx00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, in qlafx00_error_entry() argument
2666 struct qla_hw_data *ha = vha->hw; in qlafx00_error_entry()
2674 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); in qlafx00_error_entry()
2680 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_error_entry()
2681 qla2xxx_wake_dpc(vha); in qlafx00_error_entry()
2690 qlafx00_process_response_queue(struct scsi_qla_host *vha, in qlafx00_process_response_queue() argument
2719 ql_dbg(ql_dbg_async, vha, 0x507f, in qlafx00_process_response_queue()
2722 qlafx00_error_entry(vha, rsp, in qlafx00_process_response_queue()
2729 qlafx00_status_entry(vha, rsp, pkt); in qlafx00_process_response_queue()
2737 qlafx00_multistatus_entry(vha, rsp, pkt); in qlafx00_process_response_queue()
2741 qlafx00_abort_iocb_entry(vha, rsp->req, in qlafx00_process_response_queue()
2746 qlafx00_ioctl_iosb_entry(vha, rsp->req, in qlafx00_process_response_queue()
2751 ql_dbg(ql_dbg_async, vha, 0x5081, in qlafx00_process_response_queue()
2768 qlafx00_async_event(scsi_qla_host_t *vha) in qlafx00_async_event() argument
2770 struct qla_hw_data *ha = vha->hw; in qlafx00_async_event()
2778 ql_log(ql_log_warn, vha, 0x5079, in qlafx00_async_event()
2780 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_async_event()
2784 ql_dbg(ql_dbg_async, vha, 0x5076, in qlafx00_async_event()
2786 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); in qlafx00_async_event()
2787 qla2xxx_wake_dpc(vha); in qlafx00_async_event()
2794 ql_dbg(ql_dbg_async, vha, 0x5077, in qlafx00_async_event()
2802 ql_log(ql_log_info, vha, 0x5085, in qlafx00_async_event()
2809 ql_log(ql_log_info, vha, 0x5086, in qlafx00_async_event()
2816 ql_log(ql_log_info, vha, 0x5083, in qlafx00_async_event()
2830 ql_dbg(ql_dbg_async, vha, 0x5078, in qlafx00_async_event()
2836 qlafx00_post_aenfx_work(vha, ha->aenmb[0], in qlafx00_async_event()
2846 qlafx00_mbx_completion(scsi_qla_host_t *vha, uint32_t mb0) in qlafx00_mbx_completion() argument
2850 struct qla_hw_data *ha = vha->hw; in qlafx00_mbx_completion()
2854 ql_dbg(ql_dbg_async, vha, 0x507e, "MBX pointer ERROR.\n"); in qlafx00_mbx_completion()
2879 scsi_qla_host_t *vha; in qlafx00_intr_handler() local
2906 vha = pci_get_drvdata(ha->pdev); in qlafx00_intr_handler()
2909 if (qla2x00_check_reg32_for_disconnect(vha, stat)) in qlafx00_intr_handler()
2917 qlafx00_mbx_completion(vha, mb[0]); in qlafx00_intr_handler()
2923 qlafx00_async_event(vha); in qlafx00_intr_handler()
2927 qlafx00_process_response_queue(vha, rsp); in qlafx00_intr_handler()
2972 scsi_qla_host_t *vha; in qlafx00_build_scsi_iocbs() local
2980 vha = sp->vha; in qlafx00_build_scsi_iocbs()
2981 req = vha->req; in qlafx00_build_scsi_iocbs()
2999 vha->qla_stats.output_bytes += scsi_bufflen(cmd); in qlafx00_build_scsi_iocbs()
3002 vha->qla_stats.input_bytes += scsi_bufflen(cmd); in qlafx00_build_scsi_iocbs()
3058 struct scsi_qla_host *vha = sp->vha; in qlafx00_start_scsi() local
3059 struct qla_hw_data *ha = vha->hw; in qlafx00_start_scsi()
3066 req = vha->req; in qlafx00_start_scsi()
3088 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds); in qlafx00_start_scsi()
3136 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302e, in qlafx00_start_scsi()
3138 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x3032, in qlafx00_start_scsi()
3174 scsi_qla_host_t *vha = sp->vha; in qlafx00_tm_iocb() local
3175 struct req_que *req = vha->req; in qlafx00_tm_iocb()
3201 scsi_qla_host_t *vha = sp->vha; in qlafx00_abort_iocb() local
3202 struct req_que *req = vha->req; in qlafx00_abort_iocb()
3309 sp->vha->req, &lcont_pkt); in qlafx00_fxdisc_iocb()
3326 sp->vha, 0x3042, in qlafx00_fxdisc_iocb()
3335 sp->vha, 0x3043, in qlafx00_fxdisc_iocb()
3365 sp->vha->req, &lcont_pkt); in qlafx00_fxdisc_iocb()
3382 sp->vha, 0x3045, in qlafx00_fxdisc_iocb()
3391 sp->vha, 0x3046, in qlafx00_fxdisc_iocb()
3403 sp->vha, 0x3047, &fx_iocb, sizeof(fx_iocb)); in qlafx00_fxdisc_iocb()