Lines Matching +full:0 +full:x10600
30 * 0 : QLA_SUCCESS = cmd performed success
42 unsigned long flags = 0; in qlafx00_mailbox_command()
46 uint16_t command = 0; in qlafx00_mailbox_command()
56 ql_log(ql_log_warn, vha, 0x115c, 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()
81 mcp->mb[0] = MBS_LINK_DOWN_ERROR; 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()
96 "Cmd access timeout, cmd=0x%x, Exiting.\n", in qlafx00_mailbox_command()
97 mcp->mb[0]); in qlafx00_mailbox_command()
105 ql_dbg(ql_dbg_mbx, vha, 0x1178, in qlafx00_mailbox_command()
106 "Prepare to issue mbox cmd=0x%x.\n", mcp->mb[0]); in qlafx00_mailbox_command()
114 command = mcp->mb[0]; in qlafx00_mailbox_command()
117 for (cnt = 0; cnt < ha->mbx_count; cnt++) { in qlafx00_mailbox_command()
127 ha->flags.mbox_int = 0; 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()
133 ((uint8_t *)mcp->mb + 0x10), 16); in qlafx00_mailbox_command()
134 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1174, in qlafx00_mailbox_command()
135 ((uint8_t *)mcp->mb + 0x20), 8); in qlafx00_mailbox_command()
138 ql_dbg(ql_dbg_mbx, vha, 0x1179, in qlafx00_mailbox_command()
150 mcp->tov * HZ) != 0); in qlafx00_mailbox_command()
152 ql_dbg(ql_dbg_mbx, vha, 0x112c, in qlafx00_mailbox_command()
164 qla2x00_poll(ha->rsp_q_map[0]); 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()
184 ha->flags.mbox_int = 0; in qlafx00_mailbox_command()
187 if (ha->mailbox_out32[0] != MBS_COMMAND_COMPLETE) in qlafx00_mailbox_command()
192 iptr = (uint32_t *)&ha->mailbox_out32[0]; in qlafx00_mailbox_command()
194 for (cnt = 0; cnt < ha->mbx_count; cnt++) { in qlafx00_mailbox_command()
207 ha->flags.mbox_busy = 0; in qlafx00_mailbox_command()
213 ql_dbg(ql_dbg_mbx, vha, 0x113a, in qlafx00_mailbox_command()
217 qla2x00_poll(ha->rsp_q_map[0]); in qlafx00_mailbox_command()
221 mcp->mb[0] != MBC_GEN_SYSTEM_ERROR) { in qlafx00_mailbox_command()
225 ql_dbg(ql_dbg_mbx, vha, 0x115d, in qlafx00_mailbox_command()
232 ql_log(ql_log_info, base_vha, 0x115e, in qlafx00_mailbox_command()
233 "Mailbox cmd timeout occurred, cmd=0x%x, " in qlafx00_mailbox_command()
234 "mb[0]=0x%x, eeh_busy=0x%x. Scheduling ISP " in qlafx00_mailbox_command()
235 "abort.\n", command, mcp->mb[0], in qlafx00_mailbox_command()
242 ql_dbg(ql_dbg_mbx, vha, 0x1160, in qlafx00_mailbox_command()
249 ql_log(ql_log_info, base_vha, 0x1161, in qlafx00_mailbox_command()
250 "Mailbox cmd timeout occurred, cmd=0x%x, " in qlafx00_mailbox_command()
251 "mb[0]=0x%x. Scheduling ISP abort ", in qlafx00_mailbox_command()
252 command, mcp->mb[0]); in qlafx00_mailbox_command()
262 ql_dbg(ql_dbg_mbx, vha, 0x1162, in qlafx00_mailbox_command()
273 ql_log(ql_log_warn, base_vha, 0x1163, in qlafx00_mailbox_command()
274 "**** Failed=%x mbx[0]=%x, mb[1]=%x, mb[2]=%x, mb[3]=%x, cmd=%x ****.\n", in qlafx00_mailbox_command()
275 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3], in qlafx00_mailbox_command()
278 ql_dbg(ql_dbg_mbx, base_vha, 0x1164, "Done %s.\n", __func__); in qlafx00_mailbox_command()
304 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1166, in qlafx00_driver_shutdown()
307 mcp->mb[0] = MBC_MR_DRV_SHUTDOWN; in qlafx00_driver_shutdown()
314 mcp->flags = 0; 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()
350 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1169, in qlafx00_get_firmware_state()
353 mcp->mb[0] = MBC_GET_FIRMWARE_STATE; in qlafx00_get_firmware_state()
357 mcp->flags = 0; in qlafx00_get_firmware_state()
361 states[0] = mcp->mb[1]; in qlafx00_get_firmware_state()
364 ql_dbg(ql_dbg_mbx, vha, 0x116a, in qlafx00_get_firmware_state()
365 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qlafx00_get_firmware_state()
367 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116b, in qlafx00_get_firmware_state()
398 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116c, in qlafx00_init_firmware()
401 mcp->mb[0] = MBC_INITIALIZE_FIRMWARE; in qlafx00_init_firmware()
403 mcp->mb[1] = 0; in qlafx00_init_firmware()
415 ql_dbg(ql_dbg_mbx, vha, 0x116d, in qlafx00_init_firmware()
416 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qlafx00_init_firmware()
418 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116e, in qlafx00_init_firmware()
434 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x116f, in qlafx00_mbx_reg_test()
438 mcp->mb[0] = MBC_MAILBOX_REGISTER_TEST; in qlafx00_mbx_reg_test()
439 mcp->mb[1] = 0xAAAA; in qlafx00_mbx_reg_test()
440 mcp->mb[2] = 0x5555; in qlafx00_mbx_reg_test()
441 mcp->mb[3] = 0xAA55; in qlafx00_mbx_reg_test()
442 mcp->mb[4] = 0x55AA; in qlafx00_mbx_reg_test()
443 mcp->mb[5] = 0xA5A5; in qlafx00_mbx_reg_test()
444 mcp->mb[6] = 0x5A5A; in qlafx00_mbx_reg_test()
445 mcp->mb[7] = 0x2525; in qlafx00_mbx_reg_test()
446 mcp->mb[8] = 0xBBBB; in qlafx00_mbx_reg_test()
447 mcp->mb[9] = 0x6666; in qlafx00_mbx_reg_test()
448 mcp->mb[10] = 0xBB66; in qlafx00_mbx_reg_test()
449 mcp->mb[11] = 0x66BB; in qlafx00_mbx_reg_test()
450 mcp->mb[12] = 0xB6B6; in qlafx00_mbx_reg_test()
451 mcp->mb[13] = 0x6B6B; in qlafx00_mbx_reg_test()
452 mcp->mb[14] = 0x3636; in qlafx00_mbx_reg_test()
453 mcp->mb[15] = 0xCCCC; in qlafx00_mbx_reg_test()
460 mcp->buf_size = 0; in qlafx00_mbx_reg_test()
465 if (mcp->mb[17] != 0xAAAA || mcp->mb[18] != 0x5555 || in qlafx00_mbx_reg_test()
466 mcp->mb[19] != 0xAA55 || mcp->mb[20] != 0x55AA) in qlafx00_mbx_reg_test()
468 if (mcp->mb[21] != 0xA5A5 || mcp->mb[22] != 0x5A5A || in qlafx00_mbx_reg_test()
469 mcp->mb[23] != 0x2525 || mcp->mb[24] != 0xBBBB) in qlafx00_mbx_reg_test()
471 if (mcp->mb[25] != 0x6666 || mcp->mb[26] != 0xBB66 || in qlafx00_mbx_reg_test()
472 mcp->mb[27] != 0x66BB || mcp->mb[28] != 0xB6B6) in qlafx00_mbx_reg_test()
474 if (mcp->mb[29] != 0x6B6B || mcp->mb[30] != 0x3636 || in qlafx00_mbx_reg_test()
475 mcp->mb[31] != 0xCCCC) in qlafx00_mbx_reg_test()
480 ql_dbg(ql_dbg_mbx, vha, 0x1170, in qlafx00_mbx_reg_test()
481 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qlafx00_mbx_reg_test()
483 ql_dbg(ql_dbg_mbx + ql_dbg_verbose, vha, 0x1171, in qlafx00_mbx_reg_test()
493 * Returns 0 on success.
526 unsigned long flags = 0; in qlafx00_soc_cpu_reset()
534 QLAFX00_SET_HBA_SOC_REG(ha, 0x80004, 0); in qlafx00_soc_cpu_reset()
535 QLAFX00_SET_HBA_SOC_REG(ha, 0x82004, 0); in qlafx00_soc_cpu_reset()
538 QLAFX00_SET_HBA_SOC_REG(ha, 0x60920, 0x02); in qlafx00_soc_cpu_reset()
539 QLAFX00_SET_HBA_SOC_REG(ha, 0x60924, 0x02); in qlafx00_soc_cpu_reset()
540 QLAFX00_SET_HBA_SOC_REG(ha, 0xf0920, 0x02); in qlafx00_soc_cpu_reset()
541 QLAFX00_SET_HBA_SOC_REG(ha, 0xf0924, 0x02); in qlafx00_soc_cpu_reset()
544 reg_val = QLAFX00_GET_HBA_SOC_REG(ha, 0x60840); in qlafx00_soc_cpu_reset()
546 QLAFX00_SET_HBA_SOC_REG(ha, 0x60840, reg_val); in qlafx00_soc_cpu_reset()
548 reg_val = QLAFX00_GET_HBA_SOC_REG(ha, 0x60844); in qlafx00_soc_cpu_reset()
550 QLAFX00_SET_HBA_SOC_REG(ha, 0x60844, reg_val); in qlafx00_soc_cpu_reset()
552 reg_val = QLAFX00_GET_HBA_SOC_REG(ha, 0x60848); in qlafx00_soc_cpu_reset()
554 QLAFX00_SET_HBA_SOC_REG(ha, 0x60848, reg_val); in qlafx00_soc_cpu_reset()
556 reg_val = QLAFX00_GET_HBA_SOC_REG(ha, 0x6084C); in qlafx00_soc_cpu_reset()
558 QLAFX00_SET_HBA_SOC_REG(ha, 0x6084C, reg_val); in qlafx00_soc_cpu_reset()
560 for (i = 0; i < 100000; i++) { in qlafx00_soc_cpu_reset()
561 if ((QLAFX00_GET_HBA_SOC_REG(ha, 0xd0000) & 0x10000000) == 0 && in qlafx00_soc_cpu_reset()
562 (QLAFX00_GET_HBA_SOC_REG(ha, 0x10600) & 0x1) == 0) in qlafx00_soc_cpu_reset()
568 for (i = 0; i < 4; i++) { in qlafx00_soc_cpu_reset()
570 (SOC_SW_RST_CONTROL_REG_CORE0 + 8*i), (0xF01)); in qlafx00_soc_cpu_reset()
572 (SOC_SW_RST_CONTROL_REG_CORE0 + 4 + 8*i), (0x01010101)); in qlafx00_soc_cpu_reset()
576 QLAFX00_SET_HBA_SOC_REG(ha, SOC_FABRIC_RST_CONTROL_REG, (0x011f0101)); in qlafx00_soc_cpu_reset()
579 QLAFX00_SET_HBA_SOC_REG(ha, 0x10610, 1); in qlafx00_soc_cpu_reset()
580 QLAFX00_SET_HBA_SOC_REG(ha, 0x10600, 0); in qlafx00_soc_cpu_reset()
583 for (i = 0; i < 5; i++) { in qlafx00_soc_cpu_reset()
585 (SOC_PWR_MANAGEMENT_PWR_DOWN_REG + 4*i), (0x0)); in qlafx00_soc_cpu_reset()
589 for (i = 0; i < 115; i++) { in qlafx00_soc_cpu_reset()
591 (SOC_INTERRUPT_SOURCE_I_CONTROL_REG + 4*i), (0x0)); in qlafx00_soc_cpu_reset()
595 for (core = 0; core < 4; core++) in qlafx00_soc_cpu_reset()
596 for (i = 0; i < 8; i++) in qlafx00_soc_cpu_reset()
598 (SOC_CORE_TIMER_REG + 0x100*core + 4*i), (0x0)); in qlafx00_soc_cpu_reset()
601 for (core = 0; core < 4; core++) in qlafx00_soc_cpu_reset()
603 (SOC_IRQ_ACK_REG + 0x100*core), (0x3FF)); in qlafx00_soc_cpu_reset()
606 QLAFX00_SET_HBA_SOC_REG(ha, SOC_FABRIC_CONTROL_REG, (0x2)); in qlafx00_soc_cpu_reset()
607 QLAFX00_SET_HBA_SOC_REG(ha, SOC_FABRIC_CONFIG_REG, (0x3)); in qlafx00_soc_cpu_reset()
610 QLAFX00_SET_HBA_SOC_REG(ha, SOC_FABRIC_RST_CONTROL_REG, (0x0)); in qlafx00_soc_cpu_reset()
613 QLAFX00_SET_HBA_SOC_REG(ha, SOC_SW_RST_CONTROL_REG_CORE0, (0xF00)); in qlafx00_soc_cpu_reset()
628 * Returns 0 on success.
650 * Returns 0 on success.
655 int rval = 0; in qlafx00_chip_diag()
657 struct req_que *req = ha->req_q_map[0]; in qlafx00_chip_diag()
663 ql_log(ql_log_warn, vha, 0x1165, in qlafx00_chip_diag()
678 wrt_reg_dword(®->req_q_in, 0); in qlafx00_config_rings()
679 wrt_reg_dword(®->req_q_out, 0); in qlafx00_config_rings()
681 wrt_reg_dword(®->rsp_q_in, 0); in qlafx00_config_rings()
682 wrt_reg_dword(®->rsp_q_out, 0); in qlafx00_config_rings()
710 unsigned long flags = 0; in qlafx00_enable_intrs()
721 unsigned long flags = 0; in qlafx00_disable_intrs()
724 ha->interrupts_on = 0; in qlafx00_disable_intrs()
746 ql_log_pci(ql_log_fatal, ha->pdev, 0x014e, in qlafx00_iospace_config()
753 if (!(pci_resource_flags(ha->pdev, 0) & IORESOURCE_MEM)) { in qlafx00_iospace_config()
754 ql_log_pci(ql_log_warn, ha->pdev, 0x014f, in qlafx00_iospace_config()
759 if (pci_resource_len(ha->pdev, 0) < BAR0_LEN_FX00) { in qlafx00_iospace_config()
760 ql_log_pci(ql_log_warn, ha->pdev, 0x0127, in qlafx00_iospace_config()
767 ioremap(pci_resource_start(ha->pdev, 0), BAR0_LEN_FX00); in qlafx00_iospace_config()
769 ql_log_pci(ql_log_fatal, ha->pdev, 0x0128, in qlafx00_iospace_config()
775 ql_log_pci(ql_log_warn, ha->pdev, 0x0129, in qlafx00_iospace_config()
781 ql_log_pci(ql_log_warn, ha->pdev, 0x012a, in qlafx00_iospace_config()
790 ql_log_pci(ql_log_fatal, ha->pdev, 0x012b, in qlafx00_iospace_config()
798 ql_log_pci(ql_log_info, ha->pdev, 0x012c, in qlafx00_iospace_config()
799 "Bars 0x%x, iobase0 0x%p, iobase2 0x%p\n", in qlafx00_iospace_config()
802 return 0; in qlafx00_iospace_config()
812 struct req_que *req = ha->req_q_map[0]; in qlafx00_save_queue_ptrs()
813 struct rsp_que *rsp = ha->rsp_q_map[0]; in qlafx00_save_queue_ptrs()
823 ql_dbg(ql_dbg_init, vha, 0x012d, in qlafx00_save_queue_ptrs()
824 "req: %p, ring_fx00: %p, length_fx00: 0x%x," in qlafx00_save_queue_ptrs()
825 "req->dma_fx00: 0x%llx\n", req, req->ring_fx00, in qlafx00_save_queue_ptrs()
828 ql_dbg(ql_dbg_init, vha, 0x012e, in qlafx00_save_queue_ptrs()
829 "rsp: %p, ring_fx00: %p, length_fx00: 0x%x," in qlafx00_save_queue_ptrs()
830 "rsp->dma_fx00: 0x%llx\n", rsp, rsp->ring_fx00, in qlafx00_save_queue_ptrs()
838 struct req_que *req = ha->req_q_map[0]; in qlafx00_config_queues()
839 struct rsp_que *rsp = ha->rsp_q_map[0]; in qlafx00_config_queues()
845 if ((!req->ring) || (req->length == 0)) { in qlafx00_config_queues()
846 ql_log_pci(ql_log_info, ha->pdev, 0x012f, in qlafx00_config_queues()
851 ql_dbg(ql_dbg_init, vha, 0x0130, in qlafx00_config_queues()
852 "req: %p req_ring pointer %p req len 0x%x " in qlafx00_config_queues()
853 "req off 0x%x\n, req->dma: 0x%llx", in qlafx00_config_queues()
860 if ((!rsp->ring) || (rsp->length == 0)) { in qlafx00_config_queues()
861 ql_log_pci(ql_log_info, ha->pdev, 0x0131, in qlafx00_config_queues()
866 ql_dbg(ql_dbg_init, vha, 0x0132, in qlafx00_config_queues()
867 "rsp: %p rsp_ring pointer %p rsp len 0x%x " in qlafx00_config_queues()
868 "rsp off 0x%x, rsp->dma: 0x%llx\n", in qlafx00_config_queues()
878 int rval = 0; in qlafx00_init_fw_ready()
883 uint32_t aenmbx, aenmbx7 = 0; in qlafx00_init_fw_ready()
906 ql_dbg(ql_dbg_mbx, vha, 0x0133, in qlafx00_init_fw_ready()
907 "aenmbx: 0x%x\n", aenmbx); in qlafx00_init_fw_ready()
930 wrt_reg_dword(®->aenmailbox0, 0); in qlafx00_init_fw_ready()
932 ql_dbg(ql_dbg_init, vha, 0x0134, in qlafx00_init_fw_ready()
933 "f/w returned mbx_intr_code: 0x%x, " in qlafx00_init_fw_ready()
934 "rqstq_intr_code: 0x%x\n", in qlafx00_init_fw_ready()
942 if ((aenmbx & 0xFF00) == MBA_FW_INIT_INPROGRESS) in qlafx00_init_fw_ready()
968 ql_dbg(ql_dbg_init, vha, 0x0135, in qlafx00_init_fw_ready()
969 "f/w returned mbx_intr_code: 0x%x, " in qlafx00_init_fw_ready()
970 "rqstq_intr_code: 0x%x\n", in qlafx00_init_fw_ready()
981 if (state[0] == FSTATE_FX00_CONFIG_WAIT) { in qlafx00_init_fw_ready()
994 ql_dbg(ql_dbg_init, vha, 0x0136, in qlafx00_init_fw_ready()
995 "Sending Driver shutdown fw_state 0x%x\n", in qlafx00_init_fw_ready()
996 state[0]); in qlafx00_init_fw_ready()
1011 ql_dbg(ql_dbg_init, vha, 0x0137, in qlafx00_init_fw_ready()
1012 "Init f/w failed: aen[7]: 0x%x\n", 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()
1037 * Returns 0 on success.
1056 ql_dbg(ql_dbg_init, vha, 0x013a, in qlafx00_fw_ready()
1063 if (state[0] == FSTATE_FX00_INITIALIZED) { in qlafx00_fw_ready()
1064 ql_dbg(ql_dbg_init, vha, 0x013b, in qlafx00_fw_ready()
1065 "fw_state=%x\n", state[0]); in qlafx00_fw_ready()
1078 ql_dbg(ql_dbg_init, vha, 0x013c, in qlafx00_fw_ready()
1079 "fw_state=%x curr time=%lx.\n", state[0], jiffies); 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()
1110 atomic_set(&vha->loop_down_timer, 0); 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()
1133 ql_log(ql_log_warn, vha, 0x208a, in qlafx00_find_all_targets()
1140 found = 0; in qlafx00_find_all_targets()
1159 ql_dbg(ql_dbg_disc + ql_dbg_init, vha, 0x208b, in qlafx00_find_all_targets()
1161 "0x%x state: 0x%x " in qlafx00_find_all_targets()
1168 ql_log(ql_log_info, vha, 0x208c, in qlafx00_find_all_targets()
1170 "id 0x%x wwnn = %llx " in qlafx00_find_all_targets()
1180 ql_log(ql_log_info, vha, 0x208d, 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()
1220 * 0 = success.
1252 qla2x00_mark_device_lost(vha, fcport, 0); in qlafx00_configure_all_targets()
1265 ql_log(ql_log_info, vha, 0x208f, in qlafx00_configure_all_targets()
1266 "Attach new target id 0x%x wwnn = %llx " in qlafx00_configure_all_targets()
1290 * 0 = success.
1304 ql_dbg(ql_dbg_disc, vha, 0x2090, in qlafx00_configure_devices()
1305 "Configure devices -- dpc flags =0x%lx\n", flags); 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()
1335 vha->flags.online = 0; in qlafx00_abort_isp_cleanup()
1336 ha->mr.fw_hbt_en = 0; in qlafx00_abort_isp_cleanup()
1339 ha->flags.chip_reset_done = 0; in qlafx00_abort_isp_cleanup()
1342 ql_log(ql_log_info, vha, 0x013f, in qlafx00_abort_isp_cleanup()
1359 fcport->flags = 0; in qlafx00_abort_isp_cleanup()
1382 ql_log(ql_log_info, vha, 0x0140, in qlafx00_abort_isp_cleanup()
1393 * Returns 0 on success.
1402 rsp->ring_index = 0; in qlafx00_init_response_q_entries()
1405 for (cnt = 0; cnt < rsp->length; cnt++) { in qlafx00_init_response_q_entries()
1421 qla2x00_request_irqs(ha, ha->rsp_q_map[0]); in qlafx00_rescan_isp()
1431 ql_dbg(ql_dbg_disc, vha, 0x2094, in qlafx00_rescan_isp()
1432 "fw returned mbx_intr_code: 0x%x, rqstq_intr_code: 0x%x " in qlafx00_rescan_isp()
1433 " Req que offset 0x%x Rsp que offset 0x%x\n", in qlafx00_rescan_isp()
1446 status = 0; in qlafx00_rescan_isp()
1450 ql_dbg(ql_dbg_disc, vha, 0x2095, in qlafx00_rescan_isp()
1477 ha->mr.fw_hbt_miss_cnt = 0; in qlafx00_timer_routine()
1485 ha->mr.fw_hbt_miss_cnt = 0; in qlafx00_timer_routine()
1498 ha->mr.fw_reset_timer_exp = 0; in qlafx00_timer_routine()
1512 } else if (aenmbx0 == 0xFFFFFFFF) { in qlafx00_timer_routine()
1520 data0 &= 0xffff0000; in qlafx00_timer_routine()
1521 data1 &= 0x0000ffff; in qlafx00_timer_routine()
1526 } else if ((aenmbx0 & 0xFF00) == MBA_FW_POLL_STATE) { in qlafx00_timer_routine()
1544 if (ha->mr.fw_critemp_timer_tick == 0) { in qlafx00_timer_routine()
1546 ql_dbg(ql_dbg_timer, vha, 0x6012, in qlafx00_timer_routine()
1567 if (ha->mr.hinfo_resend_timer_tick == 0) { in qlafx00_timer_routine()
1588 * 0 = success
1596 ql_dbg(ql_dbg_init, vha, 0x0142, in qlafx00_reset_initialize()
1608 ql_log(ql_log_info, vha, 0x0143, in qlafx00_reset_initialize()
1610 ha->flags.mr_reset_hdlr_active = 0; in qlafx00_reset_initialize()
1622 * 0 = success
1648 ql_log(ql_log_info, vha, 0x0145, in qlafx00_abort_isp()
1662 ql_dbg(ql_dbg_async, vha, 0x5072, in qlafx00_get_fcport()
1663 "Matching fcport(%p) found with TGT-ID: 0x%x " in qlafx00_get_fcport()
1664 "and Remote TGT_ID: 0x%x\n", in qlafx00_get_fcport()
1677 ql_log(ql_log_info, vha, 0x5073, in qlafx00_tgt_detach()
1678 "Detach TGT-ID: 0x%x\n", tgt_id); in qlafx00_tgt_detach()
1684 qla2x00_mark_device_lost(vha, fcport, 0); in qlafx00_tgt_detach()
1699 if (evt->u.aenfx.mbx[1] == 0) { in qlafx00_process_aen()
1703 atomic_set(&vha->loop_down_timer, 0); in qlafx00_process_aen()
1710 } else if (evt->u.aenfx.mbx[1] == 0xffff) { in qlafx00_process_aen()
1723 aen_data = 0; in qlafx00_process_aen()
1727 aen_data = 0; in qlafx00_process_aen()
1730 ql_log(ql_log_info, vha, 0x5082, in qlafx00_process_aen()
1732 "aenmb[0]: %x\n", in qlafx00_process_aen()
1747 u64 port_name = 0, node_name = 0; in qlafx00_update_host_attr()
1830 ql_log(ql_log_warn, vha, 0x303c, in qlafx00_fx_disc()
1851 memset(preg_hsi, 0, sizeof(struct register_host_info)); 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()
1931 QLAFX00_EXTENDED_IO_EN_MASK) != 0; in qlafx00_fx_disc()
1937 vha->d_id.b.domain = pinfo->port_id[0]; in qlafx00_fx_disc()
1941 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0141, in qlafx00_fx_disc()
1949 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0144, in qlafx00_fx_disc()
1954 ql_dump_buffer(ql_dbg_init + ql_dbg_buffer, vha, 0x0146, in qlafx00_fx_disc()
1989 * 0 = success
1999 vha->flags.online = 0; in qlafx00_initialize_adapter()
2000 ha->flags.chip_reset_done = 0; in qlafx00_initialize_adapter()
2001 vha->flags.reset_active = 0; in qlafx00_initialize_adapter()
2002 ha->flags.pci_channel_io_perm_failure = 0; in qlafx00_initialize_adapter()
2003 ha->flags.eeh_busy = 0; in qlafx00_initialize_adapter()
2007 vha->dpc_flags = 0; in qlafx00_initialize_adapter()
2008 vha->flags.management_server_logged_in = 0; in qlafx00_initialize_adapter()
2009 ha->isp_abort_cnt = 0; in qlafx00_initialize_adapter()
2010 ha->beacon_blink_led = 0; in qlafx00_initialize_adapter()
2012 set_bit(0, ha->req_qid_map); in qlafx00_initialize_adapter()
2013 set_bit(0, ha->rsp_qid_map); in qlafx00_initialize_adapter()
2015 ql_dbg(ql_dbg_init, vha, 0x0147, in qlafx00_initialize_adapter()
2020 ql_log(ql_log_warn, vha, 0x0148, in qlafx00_initialize_adapter()
2047 ql_dbg(ql_dbg_init, vha, 0x0152, in qlafx00_initialize_adapter()
2048 "ISPFx00(%s): Critical temp timer, current SOC temperature: 0x%x\n", in qlafx00_initialize_adapter()
2063 ql_log(ql_log_warn, vha, 0x70ce, in qlafx00_fw_state_show()
2071 return state[0]; in qlafx00_fw_state_show()
2128 ql_dbg(ql_dbg_io, vha, 0x304d, in qlafx00_handle_sense()
2129 "sense_len=0x%x par_sense_len=0x%x track_sense_len=0x%x.\n", in qlafx00_handle_sense()
2131 if (GET_FW_SENSE_LEN(sp) > 0) { in qlafx00_handle_sense()
2137 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3039, in qlafx00_handle_sense()
2141 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x3049, in qlafx00_handle_sense()
2158 sp->done(sp, 0); in qlafx00_tm_iocb_entry()
2175 sp->done(sp, 0); in qlafx00_abort_iocb_entry()
2187 int res = 0; in qlafx00_ioctl_iosb_entry()
2207 memset(&fstatus, 0, sizeof(struct qla_mt_iocb_rsp_fx00)); in qlafx00_ioctl_iosb_entry()
2228 sp->vha, 0x5080, pkt, sizeof(*pkt)); in qlafx00_ioctl_iosb_entry()
2231 sp->vha, 0x5074, in qlafx00_ioctl_iosb_entry()
2266 int res = 0; in qlafx00_status_entry()
2285 ql_dbg(ql_dbg_io, vha, 0x3034, in qlafx00_status_entry()
2286 "Invalid status handle (0x%x).\n", handle); in qlafx00_status_entry()
2301 if (comp_status == CS_COMPLETE && scsi_status == 0) { in qlafx00_status_entry()
2309 ql_dbg(ql_dbg_io, vha, 0x3048, in qlafx00_status_entry()
2310 "Command already returned (0x%x/%p).\n", in qlafx00_status_entry()
2321 fw_resid_len = 0; in qlafx00_status_entry()
2343 if (scsi_status == 0) { in qlafx00_status_entry()
2355 ql_dbg(ql_dbg_io, fcport->vha, 0x3050, in qlafx00_status_entry()
2357 "detected (0x%x of 0x%x bytes).\n", in qlafx00_status_entry()
2368 ql_dbg(ql_dbg_io, fcport->vha, 0x3051, in qlafx00_status_entry()
2372 logit = 0; in qlafx00_status_entry()
2376 memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); in qlafx00_status_entry()
2394 ql_dbg(ql_dbg_io, fcport->vha, 0x3052, in qlafx00_status_entry()
2396 "(0x%x of 0x%x bytes).\n", in qlafx00_status_entry()
2407 ql_dbg(ql_dbg_io, fcport->vha, 0x3053, in qlafx00_status_entry()
2409 "detected (0x%x of 0x%x bytes, " in qlafx00_status_entry()
2410 "cp->underflow: 0x%x).\n", in qlafx00_status_entry()
2424 ql_dbg(ql_dbg_io, fcport->vha, 0x3054, in qlafx00_status_entry()
2425 "Dropped frame(s) detected (0x%x " in qlafx00_status_entry()
2426 "of 0x%x bytes).\n", resid, in qlafx00_status_entry()
2432 ql_dbg(ql_dbg_io, fcport->vha, 0x3055, in qlafx00_status_entry()
2433 "scsi_status: 0x%x, lscsi_status: 0x%x\n", in qlafx00_status_entry()
2438 logit = 0; in qlafx00_status_entry()
2445 if (lscsi_status != 0) { in qlafx00_status_entry()
2448 ql_dbg(ql_dbg_io, fcport->vha, 0x3056, in qlafx00_status_entry()
2457 memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE); in qlafx00_status_entry()
2482 ql_dbg(ql_dbg_io, fcport->vha, 0x3057, in qlafx00_status_entry()
2483 "Port down status: port-state=0x%x.\n", in qlafx00_status_entry()
2500 ql_dbg(ql_dbg_io, fcport->vha, 0x3058, in qlafx00_status_entry()
2501 "FCP command status: 0x%x-0x%x (0x%x) nexus=%ld:%d:%llu " in qlafx00_status_entry()
2502 "tgt_id: 0x%x lscsi_status: 0x%x cdb=%10phN len=0x%x " in qlafx00_status_entry()
2503 "rsp_info=%p resid=0x%x fw_resid=0x%x sense_len=0x%x, " in qlafx00_status_entry()
2504 "par_sense_len=0x%x, rsp_info_len=0x%x\n", in qlafx00_status_entry()
2527 uint8_t sense_sz = 0; in qlafx00_status_cont_entry()
2536 ql_dbg(ql_dbg_io, vha, 0x3037, in qlafx00_status_cont_entry()
2542 ql_dbg(ql_dbg_io, vha, 0x304b, in qlafx00_status_cont_entry()
2548 ql_log(ql_log_warn, vha, 0x303b, in qlafx00_status_cont_entry()
2556 ql_dbg(ql_dbg_io, vha, 0x304c, in qlafx00_status_cont_entry()
2561 ql_dbg(ql_dbg_io, vha, 0x304f, in qlafx00_status_cont_entry()
2562 "sp=%p sense_len=0x%x sense_ptr=%p.\n", in qlafx00_status_cont_entry()
2571 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x304e, in qlafx00_status_cont_entry()
2574 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x304a, in qlafx00_status_cont_entry()
2585 (sense_len - sizeof(pkt->data)) : 0; in qlafx00_status_cont_entry()
2589 if (sense_len == 0) { in qlafx00_status_cont_entry()
2620 ql_dbg(ql_dbg_io, vha, 0x3035, in qlafx00_multistatus_entry()
2621 "Invalid handle count (0x%x).\n", handle_count); in qlafx00_multistatus_entry()
2627 handle_ptr = &stsmfx->handles[0]; in qlafx00_multistatus_entry()
2629 for (i = 0; i < handle_count; i++) { in qlafx00_multistatus_entry()
2642 ql_dbg(ql_dbg_io, vha, 0x3044, in qlafx00_multistatus_entry()
2643 "Invalid status handle (0x%x).\n", handle); in qlafx00_multistatus_entry()
2666 uint16_t que = 0; in qlafx00_error_entry()
2693 uint16_t lreq_q_in = 0; in qlafx00_process_response_queue()
2694 uint16_t lreq_q_out = 0; in qlafx00_process_response_queue()
2708 lreq_q_out = 0; in qlafx00_process_response_queue()
2709 rsp->ring_index = 0; in qlafx00_process_response_queue()
2715 if (pkt->entry_status != 0 && in qlafx00_process_response_queue()
2717 ql_dbg(ql_dbg_async, vha, 0x507f, in qlafx00_process_response_queue()
2718 "type of error status in response: 0x%x\n", in qlafx00_process_response_queue()
2749 ql_dbg(ql_dbg_async, vha, 0x5081, in qlafx00_process_response_queue()
2774 switch (ha->aenmb[0]) { in qlafx00_async_event()
2776 ql_log(ql_log_warn, vha, 0x5079, in qlafx00_async_event()
2777 "ISP System Error - mbx1=%x\n", ha->aenmb[0]); in qlafx00_async_event()
2782 ql_dbg(ql_dbg_async, vha, 0x5076, in qlafx00_async_event()
2792 ql_dbg(ql_dbg_async, vha, 0x5077, in qlafx00_async_event()
2794 "aenmb[0]: %x, aenmb[1]: %x, aenmb[2]: %x, aenmb[3]: %x\n", in qlafx00_async_event()
2795 ha->aenmb[0], ha->aenmb[1], ha->aenmb[2], ha->aenmb[3]); in qlafx00_async_event()
2800 ql_log(ql_log_info, vha, 0x5085, in qlafx00_async_event()
2802 "aenmb[0]: %x\n", in qlafx00_async_event()
2803 ha->aenmb[0]); in qlafx00_async_event()
2807 ql_log(ql_log_info, vha, 0x5086, in qlafx00_async_event()
2809 "aenmb[0]: %x\n", in qlafx00_async_event()
2810 ha->aenmb[0]); in qlafx00_async_event()
2814 ql_log(ql_log_info, vha, 0x5083, in qlafx00_async_event()
2816 "aenmb[0]: %x\n", in qlafx00_async_event()
2817 ha->aenmb[0]); in qlafx00_async_event()
2828 ql_dbg(ql_dbg_async, vha, 0x5078, in qlafx00_async_event()
2830 ha->aenmb[0], ha->aenmb[1], ha->aenmb[2], ha->aenmb[3], in qlafx00_async_event()
2834 qlafx00_post_aenfx_work(vha, ha->aenmb[0], in qlafx00_async_event()
2841 * @mb0: value to be written into mailbox register 0
2852 ql_dbg(ql_dbg_async, vha, 0x507e, "MBX pointer ERROR.\n"); in qlafx00_mbx_completion()
2856 ha->mailbox_out32[0] = mb0; in qlafx00_mbx_completion()
2886 uint32_t clr_intr = 0; in qlafx00_intr_handler()
2887 uint32_t intr_stat = 0; in qlafx00_intr_handler()
2891 ql_log(ql_log_info, NULL, 0x507d, in qlafx00_intr_handler()
2898 status = 0; in qlafx00_intr_handler()
2905 for (iter = 50; iter--; clr_intr = 0) { in qlafx00_intr_handler()
2914 mb[0] = rd_reg_dword(®->mailbox16); in qlafx00_intr_handler()
2915 qlafx00_mbx_completion(vha, mb[0]); in qlafx00_intr_handler()
2920 ha->aenmb[0] = rd_reg_dword(®->aenmailbox0); in qlafx00_intr_handler()
2950 req->ring_index = 0; in qlafx00_prep_cont_type1_iocb()
2982 cont = 0; in qlafx00_build_scsi_iocbs()
2990 lcmd_pkt->byte_count = cpu_to_le32(0); in qlafx00_build_scsi_iocbs()
3010 if (avail_dsds == 0) { in qlafx00_build_scsi_iocbs()
3015 memset(&lcont_pkt, 0, REQUEST_ENTRY_SIZE); in qlafx00_build_scsi_iocbs()
3025 if (avail_dsds == 0 && cont == 1) { in qlafx00_build_scsi_iocbs()
3026 cont = 0; in qlafx00_build_scsi_iocbs()
3032 if (avail_dsds != 0 && cont == 1) { in qlafx00_build_scsi_iocbs()
3063 rsp = ha->rsp_q_map[0]; in qlafx00_start_scsi()
3067 tot_dsds = 0; in qlafx00_start_scsi()
3073 if (handle == 0) in qlafx00_start_scsi()
3083 nseg = 0; in qlafx00_start_scsi()
3108 memset(&lcmd_pkt, 0, REQUEST_ENTRY_SIZE); in qlafx00_start_scsi()
3111 lcmd_pkt.reserved_0 = 0; in qlafx00_start_scsi()
3112 lcmd_pkt.port_path_ctrl = 0; in qlafx00_start_scsi()
3113 lcmd_pkt.reserved_1 = 0; in qlafx00_start_scsi()
3134 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302e, in qlafx00_start_scsi()
3136 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x3032, in qlafx00_start_scsi()
3145 req->ring_index = 0; in qlafx00_start_scsi()
3177 memset(&tm_iocb, 0, sizeof(struct tsk_mgmt_entry_fx00)); in qlafx00_tm_iocb()
3181 tm_iocb.reserved_0 = 0; in qlafx00_tm_iocb()
3203 memset(&abt_iocb, 0, sizeof(struct abort_iocb_entry_fx00)); in qlafx00_abort_iocb()
3226 memset(&fx_iocb, 0, sizeof(struct fxdisc_entry_fx00)); in qlafx00_fxdisc_iocb()
3245 &fx_iocb.dseg_rq[0].address); in qlafx00_fxdisc_iocb()
3246 fx_iocb.dseg_rq[0].length = in qlafx00_fxdisc_iocb()
3255 &fx_iocb.dseg_rsp[0].address); in qlafx00_fxdisc_iocb()
3256 fx_iocb.dseg_rsp[0].length = in qlafx00_fxdisc_iocb()
3287 int index = 0, cont = 0; in qlafx00_fxdisc_iocb()
3293 cur_dsd = &fx_iocb.dseg_rq[0]; in qlafx00_fxdisc_iocb()
3298 if (avail_dsds == 0) { in qlafx00_fxdisc_iocb()
3303 memset(&lcont_pkt, 0, in qlafx00_fxdisc_iocb()
3317 if (avail_dsds == 0 && cont == 1) { in qlafx00_fxdisc_iocb()
3318 cont = 0; in qlafx00_fxdisc_iocb()
3324 sp->vha, 0x3042, in qlafx00_fxdisc_iocb()
3329 if (avail_dsds != 0 && cont == 1) { in qlafx00_fxdisc_iocb()
3333 sp->vha, 0x3043, in qlafx00_fxdisc_iocb()
3343 int index = 0, cont = 0; in qlafx00_fxdisc_iocb()
3348 cur_dsd = &fx_iocb.dseg_rsp[0]; in qlafx00_fxdisc_iocb()
3354 if (avail_dsds == 0) { in qlafx00_fxdisc_iocb()
3359 memset(&lcont_pkt, 0, in qlafx00_fxdisc_iocb()
3373 if (avail_dsds == 0 && cont == 1) { in qlafx00_fxdisc_iocb()
3374 cont = 0; in qlafx00_fxdisc_iocb()
3380 sp->vha, 0x3045, in qlafx00_fxdisc_iocb()
3385 if (avail_dsds != 0 && cont == 1) { in qlafx00_fxdisc_iocb()
3389 sp->vha, 0x3046, in qlafx00_fxdisc_iocb()
3401 sp->vha, 0x3047, &fx_iocb, sizeof(fx_iocb)); in qlafx00_fxdisc_iocb()