Lines Matching full:mb
89 * mb[MAX_MAILBOX_REGISTER_COUNT] = returned mailbox data.
155 mcp->mb[0] = MBS_LINK_DOWN_ERROR; in qla2x00_mailbox_command()
165 !is_rom_cmd(mcp->mb[0])) { in qla2x00_mailbox_command()
168 mcp->mb[0]); in qla2x00_mailbox_command()
182 mcp->mb[0]); in qla2x00_mailbox_command()
197 "Prepare to issue mbox cmd=0x%x.\n", mcp->mb[0]); in qla2x00_mailbox_command()
217 iptr = mcp->mb; in qla2x00_mailbox_command()
218 command = mcp->mb[0]; in qla2x00_mailbox_command()
367 mcp->mb[0] = MBS_LINK_DOWN_ERROR; in qla2x00_mailbox_command()
383 iptr2 = mcp->mb; in qla2x00_mailbox_command()
402 uint16_t mb[8]; in qla2x00_mailbox_command() local
407 mb[0] = rd_reg_word(®->isp24.mailbox0); in qla2x00_mailbox_command()
408 mb[1] = rd_reg_word(®->isp24.mailbox1); in qla2x00_mailbox_command()
409 mb[2] = rd_reg_word(®->isp24.mailbox2); in qla2x00_mailbox_command()
410 mb[3] = rd_reg_word(®->isp24.mailbox3); in qla2x00_mailbox_command()
411 mb[7] = rd_reg_word(®->isp24.mailbox7); in qla2x00_mailbox_command()
418 "mb[0-3]=[0x%x 0x%x 0x%x 0x%x] mb7 0x%x host_status 0x%x hccr 0x%x\n", in qla2x00_mailbox_command()
419 command, ictrl, jiffies, mb[0], mb[1], mb[2], mb[3], in qla2x00_mailbox_command()
420 mb[7], host_status, hccr); in qla2x00_mailbox_command()
423 mb[0] = RD_MAILBOX_REG(ha, ®->isp, 0); in qla2x00_mailbox_command()
427 "mb[0]=0x%x\n", command, ictrl, jiffies, mb[0]); in qla2x00_mailbox_command()
455 if (mcp->mb[0] != MBC_GEN_SYSTEM_ERROR) in qla2x00_mailbox_command()
476 mcp->mb[0] != MBC_GEN_SYSTEM_ERROR) { in qla2x00_mailbox_command()
497 "mb[0]=0x%x, eeh_busy=0x%x. Scheduling ISP " in qla2x00_mailbox_command()
498 "abort.\n", command, mcp->mb[0], in qla2x00_mailbox_command()
522 "mb[0]=0x%x. Scheduling ISP abort ", in qla2x00_mailbox_command()
523 command, mcp->mb[0]); in qla2x00_mailbox_command()
549 mcp->mb[0]); in qla2x00_mailbox_command()
559 printk(" mb[%u]=%x", i, mcp->mb[i]); in qla2x00_mailbox_command()
597 mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; in qla2x00_load_ram()
598 mcp->mb[8] = MSW(risc_addr); in qla2x00_load_ram()
601 mcp->mb[0] = MBC_LOAD_RISC_RAM; in qla2x00_load_ram()
604 mcp->mb[1] = LSW(risc_addr); in qla2x00_load_ram()
605 mcp->mb[2] = MSW(req_dma); in qla2x00_load_ram()
606 mcp->mb[3] = LSW(req_dma); in qla2x00_load_ram()
607 mcp->mb[6] = MSW(MSD(req_dma)); in qla2x00_load_ram()
608 mcp->mb[7] = LSW(MSD(req_dma)); in qla2x00_load_ram()
611 mcp->mb[4] = MSW(risc_code_size); in qla2x00_load_ram()
612 mcp->mb[5] = LSW(risc_code_size); in qla2x00_load_ram()
615 mcp->mb[4] = LSW(risc_code_size); in qla2x00_load_ram()
626 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_load_ram()
627 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_load_ram()
668 mcp->mb[0] = MBC_EXECUTE_FIRMWARE; in qla2x00_execute_fw()
672 mcp->mb[1] = MSW(risc_addr); in qla2x00_execute_fw()
673 mcp->mb[2] = LSW(risc_addr); in qla2x00_execute_fw()
674 mcp->mb[3] = 0; in qla2x00_execute_fw()
675 mcp->mb[4] = 0; in qla2x00_execute_fw()
676 mcp->mb[11] = 0; in qla2x00_execute_fw()
680 mcp->mb[4] = BIT_0; in qla2x00_execute_fw()
682 mcp->mb[4] |= in qla2x00_execute_fw()
687 mcp->mb[4] |= NVME_ENABLE_FLAG; in qla2x00_execute_fw()
694 mcp->mb[4] |= BIT_4; in qla2x00_execute_fw()
695 mcp->mb[11] |= nv->min_supported_speed & 0xF; in qla2x00_execute_fw()
704 mcp->mb[4] |= ENABLE_EXTENDED_LOGIN; in qla2x00_execute_fw()
707 mcp->mb[4] |= ENABLE_EXCHANGE_OFFLD; in qla2x00_execute_fw()
710 mcp->mb[11] |= EXE_FW_FORCE_SEMAPHORE; in qla2x00_execute_fw()
715 mcp->mb[1] = LSW(risc_addr); in qla2x00_execute_fw()
718 mcp->mb[2] = 0; in qla2x00_execute_fw()
729 mcp->mb[1] == 0x27 && retry) { in qla2x00_execute_fw()
738 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_execute_fw()
745 ha->fw_ability_mask = mcp->mb[3] << 16 | mcp->mb[2]; in qla2x00_execute_fw()
748 ql_dbg(ql_dbg_mbx, vha, 0x1027, "exchanges=%x.\n", mcp->mb[1]); in qla2x00_execute_fw()
750 ha->max_supported_speed = mcp->mb[2] & (BIT_0|BIT_1); in qla2x00_execute_fw()
756 ha->min_supported_speed = mcp->mb[5] & in qla2x00_execute_fw()
802 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla_get_exlogin_status()
803 mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; in qla_get_exlogin_status()
804 mcp->mb[1] = FETCH_XLOGINS_STAT; in qla_get_exlogin_status()
814 *buf_sz = mcp->mb[4]; in qla_get_exlogin_status()
815 *ex_logins_cnt = mcp->mb[10]; in qla_get_exlogin_status()
819 mcp->mb[4], mcp->mb[10]); in qla_get_exlogin_status()
859 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla_set_exlogin_mem_cfg()
860 mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; in qla_set_exlogin_mem_cfg()
861 mcp->mb[1] = CONFIG_XLOGINS_MEM; in qla_set_exlogin_mem_cfg()
862 mcp->mb[2] = MSW(phys_addr); in qla_set_exlogin_mem_cfg()
863 mcp->mb[3] = LSW(phys_addr); in qla_set_exlogin_mem_cfg()
864 mcp->mb[6] = MSW(MSD(phys_addr)); in qla_set_exlogin_mem_cfg()
865 mcp->mb[7] = LSW(MSD(phys_addr)); in qla_set_exlogin_mem_cfg()
866 mcp->mb[8] = MSW(ha->exlogin_size); in qla_set_exlogin_mem_cfg()
867 mcp->mb[9] = LSW(ha->exlogin_size); in qla_set_exlogin_mem_cfg()
876 rval, mcp->mb[0], mcp->mb[11]); in qla_set_exlogin_mem_cfg()
912 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla_get_exchoffld_status()
913 mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; in qla_get_exchoffld_status()
914 mcp->mb[1] = FETCH_XCHOFFLD_STAT; in qla_get_exchoffld_status()
924 *buf_sz = mcp->mb[4]; in qla_get_exchoffld_status()
925 *ex_logins_cnt = mcp->mb[10]; in qla_get_exchoffld_status()
929 mcp->mb[4], mcp->mb[10]); in qla_get_exchoffld_status()
969 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla_set_exchoffld_mem_cfg()
970 mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; in qla_set_exchoffld_mem_cfg()
971 mcp->mb[1] = CONFIG_XCHOFFLD_MEM; in qla_set_exchoffld_mem_cfg()
972 mcp->mb[2] = MSW(ha->exchoffld_buf_dma); in qla_set_exchoffld_mem_cfg()
973 mcp->mb[3] = LSW(ha->exchoffld_buf_dma); in qla_set_exchoffld_mem_cfg()
974 mcp->mb[6] = MSW(MSD(ha->exchoffld_buf_dma)); in qla_set_exchoffld_mem_cfg()
975 mcp->mb[7] = LSW(MSD(ha->exchoffld_buf_dma)); in qla_set_exchoffld_mem_cfg()
976 mcp->mb[8] = MSW(ha->exchoffld_size); in qla_set_exchoffld_mem_cfg()
977 mcp->mb[9] = LSW(ha->exchoffld_size); in qla_set_exchoffld_mem_cfg()
1021 mcp->mb[0] = MBC_GET_FIRMWARE_VERSION; in qla2x00_get_fw_version()
1040 ha->fw_major_version = mcp->mb[1]; in qla2x00_get_fw_version()
1041 ha->fw_minor_version = mcp->mb[2]; in qla2x00_get_fw_version()
1042 ha->fw_subminor_version = mcp->mb[3]; in qla2x00_get_fw_version()
1043 ha->fw_attributes = mcp->mb[6]; in qla2x00_get_fw_version()
1047 ha->fw_memory_size = (mcp->mb[5] << 16) | mcp->mb[4]; in qla2x00_get_fw_version()
1050 ha->mpi_version[0] = mcp->mb[10] & 0xff; in qla2x00_get_fw_version()
1051 ha->mpi_version[1] = mcp->mb[11] >> 8; in qla2x00_get_fw_version()
1052 ha->mpi_version[2] = mcp->mb[11] & 0xff; in qla2x00_get_fw_version()
1053 ha->mpi_capabilities = (mcp->mb[12] << 16) | mcp->mb[13]; in qla2x00_get_fw_version()
1054 ha->phy_version[0] = mcp->mb[8] & 0xff; in qla2x00_get_fw_version()
1055 ha->phy_version[1] = mcp->mb[9] >> 8; in qla2x00_get_fw_version()
1056 ha->phy_version[2] = mcp->mb[9] & 0xff; in qla2x00_get_fw_version()
1060 ha->fw_attributes_h = mcp->mb[15]; in qla2x00_get_fw_version()
1061 ha->fw_attributes_ext[0] = mcp->mb[16]; in qla2x00_get_fw_version()
1062 ha->fw_attributes_ext[1] = mcp->mb[17]; in qla2x00_get_fw_version()
1065 __func__, mcp->mb[15], mcp->mb[6]); in qla2x00_get_fw_version()
1068 __func__, mcp->mb[17], mcp->mb[16]); in qla2x00_get_fw_version()
1106 ha->serdes_version[0] = mcp->mb[7] & 0xff; in qla2x00_get_fw_version()
1107 ha->serdes_version[1] = mcp->mb[8] >> 8; in qla2x00_get_fw_version()
1108 ha->serdes_version[2] = mcp->mb[8] & 0xff; in qla2x00_get_fw_version()
1109 ha->mpi_version[0] = mcp->mb[10] & 0xff; in qla2x00_get_fw_version()
1110 ha->mpi_version[1] = mcp->mb[11] >> 8; in qla2x00_get_fw_version()
1111 ha->mpi_version[2] = mcp->mb[11] & 0xff; in qla2x00_get_fw_version()
1112 ha->pep_version[0] = mcp->mb[13] & 0xff; in qla2x00_get_fw_version()
1113 ha->pep_version[1] = mcp->mb[14] >> 8; in qla2x00_get_fw_version()
1114 ha->pep_version[2] = mcp->mb[14] & 0xff; in qla2x00_get_fw_version()
1115 ha->fw_shared_ram_start = (mcp->mb[19] << 16) | mcp->mb[18]; in qla2x00_get_fw_version()
1116 ha->fw_shared_ram_end = (mcp->mb[21] << 16) | mcp->mb[20]; in qla2x00_get_fw_version()
1117 ha->fw_ddr_ram_start = (mcp->mb[23] << 16) | mcp->mb[22]; in qla2x00_get_fw_version()
1118 ha->fw_ddr_ram_end = (mcp->mb[25] << 16) | mcp->mb[24]; in qla2x00_get_fw_version()
1120 if (mcp->mb[16] & BIT_10) in qla2x00_get_fw_version()
1182 mcp->mb[0] = MBC_GET_FIRMWARE_OPTION; in qla2x00_get_fw_options()
1193 fwopts[0] = mcp->mb[0]; in qla2x00_get_fw_options()
1194 fwopts[1] = mcp->mb[1]; in qla2x00_get_fw_options()
1195 fwopts[2] = mcp->mb[2]; in qla2x00_get_fw_options()
1196 fwopts[3] = mcp->mb[3]; in qla2x00_get_fw_options()
1230 mcp->mb[0] = MBC_SET_FIRMWARE_OPTION; in qla2x00_set_fw_options()
1231 mcp->mb[1] = fwopts[1]; in qla2x00_set_fw_options()
1232 mcp->mb[2] = fwopts[2]; in qla2x00_set_fw_options()
1233 mcp->mb[3] = fwopts[3]; in qla2x00_set_fw_options()
1238 mcp->mb[10] = fwopts[10]; in qla2x00_set_fw_options()
1241 mcp->mb[10] = fwopts[10]; in qla2x00_set_fw_options()
1242 mcp->mb[11] = fwopts[11]; in qla2x00_set_fw_options()
1243 mcp->mb[12] = 0; /* Undocumented, but used */ in qla2x00_set_fw_options()
1250 fwopts[0] = mcp->mb[0]; in qla2x00_set_fw_options()
1255 "Failed=%x (%x/%x).\n", rval, mcp->mb[0], mcp->mb[1]); in qla2x00_set_fw_options()
1290 mcp->mb[0] = MBC_MAILBOX_REGISTER_TEST; in qla2x00_mbx_reg_test()
1291 mcp->mb[1] = 0xAAAA; in qla2x00_mbx_reg_test()
1292 mcp->mb[2] = 0x5555; in qla2x00_mbx_reg_test()
1293 mcp->mb[3] = 0xAA55; in qla2x00_mbx_reg_test()
1294 mcp->mb[4] = 0x55AA; in qla2x00_mbx_reg_test()
1295 mcp->mb[5] = 0xA5A5; in qla2x00_mbx_reg_test()
1296 mcp->mb[6] = 0x5A5A; in qla2x00_mbx_reg_test()
1297 mcp->mb[7] = 0x2525; in qla2x00_mbx_reg_test()
1305 if (mcp->mb[1] != 0xAAAA || mcp->mb[2] != 0x5555 || in qla2x00_mbx_reg_test()
1306 mcp->mb[3] != 0xAA55 || mcp->mb[4] != 0x55AA) in qla2x00_mbx_reg_test()
1308 if (mcp->mb[5] != 0xA5A5 || mcp->mb[6] != 0x5A5A || in qla2x00_mbx_reg_test()
1309 mcp->mb[7] != 0x2525) in qla2x00_mbx_reg_test()
1350 mcp->mb[0] = MBC_VERIFY_CHECKSUM; in qla2x00_verify_checksum()
1354 mcp->mb[1] = MSW(risc_addr); in qla2x00_verify_checksum()
1355 mcp->mb[2] = LSW(risc_addr); in qla2x00_verify_checksum()
1359 mcp->mb[1] = LSW(risc_addr); in qla2x00_verify_checksum()
1371 (mcp->mb[2] << 16) | mcp->mb[1] : mcp->mb[1]); in qla2x00_verify_checksum()
1412 mcp->mb[0] = MBC_IOCB_COMMAND_A64; in qla2x00_issue_iocb_timeout()
1413 mcp->mb[1] = 0; in qla2x00_issue_iocb_timeout()
1414 mcp->mb[2] = MSW(LSD(phys_addr)); in qla2x00_issue_iocb_timeout()
1415 mcp->mb[3] = LSW(LSD(phys_addr)); in qla2x00_issue_iocb_timeout()
1416 mcp->mb[6] = MSW(MSD(phys_addr)); in qla2x00_issue_iocb_timeout()
1417 mcp->mb[7] = LSW(MSD(phys_addr)); in qla2x00_issue_iocb_timeout()
1497 mcp->mb[0] = MBC_ABORT_COMMAND; in qla2x00_abort_command()
1499 mcp->mb[1] = fcport->loop_id; in qla2x00_abort_command()
1501 mcp->mb[1] = fcport->loop_id << 8; in qla2x00_abort_command()
1502 mcp->mb[2] = (uint16_t)handle; in qla2x00_abort_command()
1503 mcp->mb[3] = (uint16_t)(handle >> 16); in qla2x00_abort_command()
1504 mcp->mb[6] = (uint16_t)cmd->device->lun; in qla2x00_abort_command()
1534 mcp->mb[0] = MBC_ABORT_TARGET; in qla2x00_abort_target()
1537 mcp->mb[1] = fcport->loop_id; in qla2x00_abort_target()
1538 mcp->mb[10] = 0; in qla2x00_abort_target()
1541 mcp->mb[1] = fcport->loop_id << 8; in qla2x00_abort_target()
1543 mcp->mb[2] = vha->hw->loop_reset_delay; in qla2x00_abort_target()
1544 mcp->mb[9] = vha->vp_idx; in qla2x00_abort_target()
1582 mcp->mb[0] = MBC_LUN_RESET; in qla2x00_lun_reset()
1585 mcp->mb[1] = fcport->loop_id; in qla2x00_lun_reset()
1587 mcp->mb[1] = fcport->loop_id << 8; in qla2x00_lun_reset()
1588 mcp->mb[2] = (u32)l; in qla2x00_lun_reset()
1589 mcp->mb[3] = 0; in qla2x00_lun_reset()
1590 mcp->mb[9] = vha->vp_idx; in qla2x00_lun_reset()
1645 mcp->mb[0] = MBC_GET_ADAPTER_LOOP_ID; in qla2x00_get_adapter_id()
1646 mcp->mb[9] = vha->vp_idx; in qla2x00_get_adapter_id()
1661 if (mcp->mb[0] == MBS_COMMAND_ERROR) in qla2x00_get_adapter_id()
1663 else if (mcp->mb[0] == MBS_INVALID_COMMAND) in qla2x00_get_adapter_id()
1667 *id = mcp->mb[1]; in qla2x00_get_adapter_id()
1668 *al_pa = LSB(mcp->mb[2]); in qla2x00_get_adapter_id()
1669 *area = MSB(mcp->mb[2]); in qla2x00_get_adapter_id()
1670 *domain = LSB(mcp->mb[3]); in qla2x00_get_adapter_id()
1671 *top = mcp->mb[6]; in qla2x00_get_adapter_id()
1672 *sw_cap = mcp->mb[7]; in qla2x00_get_adapter_id()
1682 vha->fcoe_vlan_id = mcp->mb[9] & 0xfff; in qla2x00_get_adapter_id()
1683 vha->fcoe_fcf_idx = mcp->mb[10]; in qla2x00_get_adapter_id()
1684 vha->fcoe_vn_port_mac[5] = mcp->mb[11] >> 8; in qla2x00_get_adapter_id()
1685 vha->fcoe_vn_port_mac[4] = mcp->mb[11] & 0xff; in qla2x00_get_adapter_id()
1686 vha->fcoe_vn_port_mac[3] = mcp->mb[12] >> 8; in qla2x00_get_adapter_id()
1687 vha->fcoe_vn_port_mac[2] = mcp->mb[12] & 0xff; in qla2x00_get_adapter_id()
1688 vha->fcoe_vn_port_mac[1] = mcp->mb[13] >> 8; in qla2x00_get_adapter_id()
1689 vha->fcoe_vn_port_mac[0] = mcp->mb[13] & 0xff; in qla2x00_get_adapter_id()
1693 if (mcp->mb[7] & BIT_14) { in qla2x00_get_adapter_id()
1694 vha->port_name[0] = MSB(mcp->mb[16]); in qla2x00_get_adapter_id()
1695 vha->port_name[1] = LSB(mcp->mb[16]); in qla2x00_get_adapter_id()
1696 vha->port_name[2] = MSB(mcp->mb[17]); in qla2x00_get_adapter_id()
1697 vha->port_name[3] = LSB(mcp->mb[17]); in qla2x00_get_adapter_id()
1698 vha->port_name[4] = MSB(mcp->mb[18]); in qla2x00_get_adapter_id()
1699 vha->port_name[5] = LSB(mcp->mb[18]); in qla2x00_get_adapter_id()
1700 vha->port_name[6] = MSB(mcp->mb[19]); in qla2x00_get_adapter_id()
1701 vha->port_name[7] = LSB(mcp->mb[19]); in qla2x00_get_adapter_id()
1711 vha->bbcr = mcp->mb[15]; in qla2x00_get_adapter_id()
1712 if (mcp->mb[7] & SCM_EDC_ACC_RECEIVED) { in qla2x00_get_adapter_id()
1715 mcp->mb[21]); in qla2x00_get_adapter_id()
1717 if (mcp->mb[7] & SCM_RDF_ACC_RECEIVED) { in qla2x00_get_adapter_id()
1723 mcp->mb[23]); in qla2x00_get_adapter_id()
1758 mcp->mb[0] = MBC_GET_RETRY_COUNT; in qla2x00_get_retry_cnt()
1768 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_retry_cnt()
1771 *r_a_tov = mcp->mb[3] / 2; in qla2x00_get_retry_cnt()
1772 ratov = (mcp->mb[3]/2) / 10; /* mb[3] value is in 100ms */ in qla2x00_get_retry_cnt()
1773 if (mcp->mb[1] * ratov > (*retry_cnt) * (*tov)) { in qla2x00_get_retry_cnt()
1775 *retry_cnt = (uint8_t)mcp->mb[1]; in qla2x00_get_retry_cnt()
1780 "Done %s mb3=%d ratov=%d.\n", __func__, mcp->mb[3], ratov); in qla2x00_get_retry_cnt()
1819 mcp->mb[0] = MBC_MID_INITIALIZE_FIRMWARE; in qla2x00_init_firmware()
1821 mcp->mb[0] = MBC_INITIALIZE_FIRMWARE; in qla2x00_init_firmware()
1823 mcp->mb[1] = 0; in qla2x00_init_firmware()
1824 mcp->mb[2] = MSW(ha->init_cb_dma); in qla2x00_init_firmware()
1825 mcp->mb[3] = LSW(ha->init_cb_dma); in qla2x00_init_firmware()
1826 mcp->mb[6] = MSW(MSD(ha->init_cb_dma)); in qla2x00_init_firmware()
1827 mcp->mb[7] = LSW(MSD(ha->init_cb_dma)); in qla2x00_init_firmware()
1830 mcp->mb[1] = BIT_0; in qla2x00_init_firmware()
1831 mcp->mb[10] = MSW(ha->ex_init_cb_dma); in qla2x00_init_firmware()
1832 mcp->mb[11] = LSW(ha->ex_init_cb_dma); in qla2x00_init_firmware()
1833 mcp->mb[12] = MSW(MSD(ha->ex_init_cb_dma)); in qla2x00_init_firmware()
1834 mcp->mb[13] = LSW(MSD(ha->ex_init_cb_dma)); in qla2x00_init_firmware()
1835 mcp->mb[14] = sizeof(*ha->ex_init_cb); in qla2x00_init_firmware()
1840 mcp->mb[1] |= BIT_1; in qla2x00_init_firmware()
1841 mcp->mb[16] = MSW(ha->sf_init_cb_dma); in qla2x00_init_firmware()
1842 mcp->mb[17] = LSW(ha->sf_init_cb_dma); in qla2x00_init_firmware()
1843 mcp->mb[18] = MSW(MSD(ha->sf_init_cb_dma)); in qla2x00_init_firmware()
1844 mcp->mb[19] = LSW(MSD(ha->sf_init_cb_dma)); in qla2x00_init_firmware()
1845 mcp->mb[15] = sizeof(*ha->sf_init_cb); in qla2x00_init_firmware()
1862 "Failed=%x mb[0]=%x, mb[1]=%x, mb[2]=%x, mb[3]=%x.\n", in qla2x00_init_firmware()
1863 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3]); in qla2x00_init_firmware()
1876 if (mcp->mb[2] == 6 || mcp->mb[3] == 2) in qla2x00_init_firmware()
1927 mcp->mb[0] = MBC_GET_PORT_DATABASE; in qla2x00_get_port_database()
1929 mcp->mb[0] = MBC_ENHANCED_GET_PORT_DATABASE; in qla2x00_get_port_database()
1930 mcp->mb[2] = MSW(pd_dma); in qla2x00_get_port_database()
1931 mcp->mb[3] = LSW(pd_dma); in qla2x00_get_port_database()
1932 mcp->mb[6] = MSW(MSD(pd_dma)); in qla2x00_get_port_database()
1933 mcp->mb[7] = LSW(MSD(pd_dma)); in qla2x00_get_port_database()
1934 mcp->mb[9] = vha->vp_idx; in qla2x00_get_port_database()
1938 mcp->mb[1] = fcport->loop_id; in qla2x00_get_port_database()
1939 mcp->mb[10] = opt; in qla2x00_get_port_database()
1943 mcp->mb[1] = fcport->loop_id; in qla2x00_get_port_database()
1944 mcp->mb[10] = opt; in qla2x00_get_port_database()
1947 mcp->mb[1] = fcport->loop_id << 8 | opt; in qla2x00_get_port_database()
2068 "Failed=%x mb[0]=%x mb[1]=%x.\n", rval, in qla2x00_get_port_database()
2069 mcp->mb[0], mcp->mb[1]); in qla2x00_get_port_database()
2099 mcp->mb[0] = MBC_GET_PORT_DATABASE; in qla24xx_get_port_database()
2100 mcp->mb[1] = nport_handle; in qla24xx_get_port_database()
2101 mcp->mb[2] = MSW(LSD(pdb_dma)); in qla24xx_get_port_database()
2102 mcp->mb[3] = LSW(LSD(pdb_dma)); in qla24xx_get_port_database()
2103 mcp->mb[6] = MSW(MSD(pdb_dma)); in qla24xx_get_port_database()
2104 mcp->mb[7] = LSW(MSD(pdb_dma)); in qla24xx_get_port_database()
2105 mcp->mb[9] = 0; in qla24xx_get_port_database()
2106 mcp->mb[10] = 0; in qla24xx_get_port_database()
2116 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla24xx_get_port_database()
2117 rval, mcp->mb[0], mcp->mb[1]); in qla24xx_get_port_database()
2156 mcp->mb[0] = MBC_GET_FIRMWARE_STATE; in qla2x00_get_firmware_state()
2167 states[0] = mcp->mb[1]; in qla2x00_get_firmware_state()
2169 states[1] = mcp->mb[2]; in qla2x00_get_firmware_state()
2170 states[2] = mcp->mb[3]; /* SFP info */ in qla2x00_get_firmware_state()
2171 states[3] = mcp->mb[4]; in qla2x00_get_firmware_state()
2172 states[4] = mcp->mb[5]; in qla2x00_get_firmware_state()
2173 states[5] = mcp->mb[6]; /* DPORT status */ in qla2x00_get_firmware_state()
2181 if (mcp->mb[2] == 6 || mcp->mb[3] == 2) in qla2x00_get_firmware_state()
2221 mcp->mb[0] = MBC_GET_PORT_NAME; in qla2x00_get_port_name()
2222 mcp->mb[9] = vha->vp_idx; in qla2x00_get_port_name()
2225 mcp->mb[1] = loop_id; in qla2x00_get_port_name()
2226 mcp->mb[10] = opt; in qla2x00_get_port_name()
2229 mcp->mb[1] = loop_id << 8 | opt; in qla2x00_get_port_name()
2243 name[0] = MSB(mcp->mb[2]); in qla2x00_get_port_name()
2244 name[1] = LSB(mcp->mb[2]); in qla2x00_get_port_name()
2245 name[2] = MSB(mcp->mb[3]); in qla2x00_get_port_name()
2246 name[3] = LSB(mcp->mb[3]); in qla2x00_get_port_name()
2247 name[4] = MSB(mcp->mb[6]); in qla2x00_get_port_name()
2248 name[5] = LSB(mcp->mb[6]); in qla2x00_get_port_name()
2249 name[6] = MSB(mcp->mb[7]); in qla2x00_get_port_name()
2250 name[7] = LSB(mcp->mb[7]); in qla2x00_get_port_name()
2288 mcp->mb[0] = MBC_LINK_INITIALIZATION; in qla24xx_link_initialize()
2289 mcp->mb[1] = BIT_4; in qla24xx_link_initialize()
2291 mcp->mb[1] |= BIT_6; in qla24xx_link_initialize()
2293 mcp->mb[1] |= BIT_5; in qla24xx_link_initialize()
2294 mcp->mb[2] = 0; in qla24xx_link_initialize()
2295 mcp->mb[3] = 0; in qla24xx_link_initialize()
2339 mcp->mb[0] = MBC_LIP_FULL_LOGIN; in qla2x00_lip_reset()
2340 mcp->mb[1] = BIT_1; in qla2x00_lip_reset()
2341 mcp->mb[2] = 0; in qla2x00_lip_reset()
2344 mcp->mb[0] = MBC_LIP_FULL_LOGIN; in qla2x00_lip_reset()
2345 mcp->mb[1] = BIT_4; in qla2x00_lip_reset()
2346 mcp->mb[2] = 0; in qla2x00_lip_reset()
2347 mcp->mb[3] = vha->hw->loop_reset_delay; in qla2x00_lip_reset()
2350 mcp->mb[0] = MBC_LIP_RESET; in qla2x00_lip_reset()
2353 mcp->mb[1] = 0x00ff; in qla2x00_lip_reset()
2354 mcp->mb[10] = 0; in qla2x00_lip_reset()
2357 mcp->mb[1] = 0xff00; in qla2x00_lip_reset()
2359 mcp->mb[2] = vha->hw->loop_reset_delay; in qla2x00_lip_reset()
2360 mcp->mb[3] = 0; in qla2x00_lip_reset()
2412 mcp->mb[0] = MBC_SEND_SNS_COMMAND; in qla2x00_send_sns()
2413 mcp->mb[1] = cmd_size; in qla2x00_send_sns()
2414 mcp->mb[2] = MSW(sns_phys_address); in qla2x00_send_sns()
2415 mcp->mb[3] = LSW(sns_phys_address); in qla2x00_send_sns()
2416 mcp->mb[6] = MSW(MSD(sns_phys_address)); in qla2x00_send_sns()
2417 mcp->mb[7] = LSW(MSD(sns_phys_address)); in qla2x00_send_sns()
2428 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_send_sns()
2429 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_send_sns()
2441 uint8_t area, uint8_t al_pa, uint16_t *mb, uint8_t opt) in qla24xx_login_fabric() argument
2500 mb[0] = MBS_PORT_ID_USED; in qla24xx_login_fabric()
2501 mb[1] = LSW(iop[1]); in qla24xx_login_fabric()
2504 mb[0] = MBS_LOOP_ID_USED; in qla24xx_login_fabric()
2520 mb[0] = MBS_COMMAND_ERROR; in qla24xx_login_fabric()
2529 mb[0] = MBS_COMMAND_COMPLETE; in qla24xx_login_fabric()
2530 mb[1] = 0; in qla24xx_login_fabric()
2533 mb[1] |= BIT_1; in qla24xx_login_fabric()
2535 mb[1] = BIT_0; in qla24xx_login_fabric()
2538 mb[10] = 0; in qla24xx_login_fabric()
2540 mb[10] |= BIT_0; /* Class 2. */ in qla24xx_login_fabric()
2542 mb[10] |= BIT_1; /* Class 3. */ in qla24xx_login_fabric()
2544 mb[10] |= BIT_7; /* Confirmed Completion in qla24xx_login_fabric()
2577 uint8_t area, uint8_t al_pa, uint16_t *mb, uint8_t opt) in qla2x00_login_fabric() argument
2587 mcp->mb[0] = MBC_LOGIN_FABRIC_PORT; in qla2x00_login_fabric()
2590 mcp->mb[1] = loop_id; in qla2x00_login_fabric()
2591 mcp->mb[10] = opt; in qla2x00_login_fabric()
2594 mcp->mb[1] = (loop_id << 8) | opt; in qla2x00_login_fabric()
2596 mcp->mb[2] = domain; in qla2x00_login_fabric()
2597 mcp->mb[3] = area << 8 | al_pa; in qla2x00_login_fabric()
2605 if (mb != NULL) { in qla2x00_login_fabric()
2606 mb[0] = mcp->mb[0]; in qla2x00_login_fabric()
2607 mb[1] = mcp->mb[1]; in qla2x00_login_fabric()
2608 mb[2] = mcp->mb[2]; in qla2x00_login_fabric()
2609 mb[6] = mcp->mb[6]; in qla2x00_login_fabric()
2610 mb[7] = mcp->mb[7]; in qla2x00_login_fabric()
2612 mb[10] = 0; in qla2x00_login_fabric()
2622 if (mcp->mb[0] == 0x4001 || mcp->mb[0] == 0x4002 || in qla2x00_login_fabric()
2623 mcp->mb[0] == 0x4003 || mcp->mb[0] == 0x4005 || in qla2x00_login_fabric()
2624 mcp->mb[0] == 0x4006) in qla2x00_login_fabric()
2629 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla2x00_login_fabric()
2630 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_login_fabric()
2673 mcp->mb[0] = MBC_LOGIN_LOOP_PORT; in qla2x00_login_local_device()
2675 mcp->mb[1] = fcport->loop_id; in qla2x00_login_local_device()
2677 mcp->mb[1] = fcport->loop_id << 8; in qla2x00_login_local_device()
2678 mcp->mb[2] = opt; in qla2x00_login_local_device()
2687 mb_ret[0] = mcp->mb[0]; in qla2x00_login_local_device()
2688 mb_ret[1] = mcp->mb[1]; in qla2x00_login_local_device()
2689 mb_ret[6] = mcp->mb[6]; in qla2x00_login_local_device()
2690 mb_ret[7] = mcp->mb[7]; in qla2x00_login_local_device()
2700 if (mcp->mb[0] == 0x4005 || mcp->mb[0] == 0x4006) in qla2x00_login_local_device()
2704 "Failed=%x mb[0]=%x mb[1]=%x mb[6]=%x mb[7]=%x.\n", in qla2x00_login_local_device()
2705 rval, mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7]); in qla2x00_login_local_device()
2801 mcp->mb[0] = MBC_LOGOUT_FABRIC_PORT; in qla2x00_fabric_logout()
2804 mcp->mb[1] = loop_id; in qla2x00_fabric_logout()
2805 mcp->mb[10] = 0; in qla2x00_fabric_logout()
2808 mcp->mb[1] = loop_id << 8; in qla2x00_fabric_logout()
2819 "Failed=%x mb[1]=%x.\n", rval, mcp->mb[1]); in qla2x00_fabric_logout()
2854 mcp->mb[0] = MBC_LIP_FULL_LOGIN; in qla2x00_full_login_lip()
2855 mcp->mb[1] = IS_FWI2_CAPABLE(vha->hw) ? BIT_4 : 0; in qla2x00_full_login_lip()
2856 mcp->mb[2] = 0; in qla2x00_full_login_lip()
2857 mcp->mb[3] = 0; in qla2x00_full_login_lip()
2902 mcp->mb[0] = MBC_GET_ID_LIST; in qla2x00_get_id_list()
2905 mcp->mb[2] = MSW(id_list_dma); in qla2x00_get_id_list()
2906 mcp->mb[3] = LSW(id_list_dma); in qla2x00_get_id_list()
2907 mcp->mb[6] = MSW(MSD(id_list_dma)); in qla2x00_get_id_list()
2908 mcp->mb[7] = LSW(MSD(id_list_dma)); in qla2x00_get_id_list()
2909 mcp->mb[8] = 0; in qla2x00_get_id_list()
2910 mcp->mb[9] = vha->vp_idx; in qla2x00_get_id_list()
2913 mcp->mb[1] = MSW(id_list_dma); in qla2x00_get_id_list()
2914 mcp->mb[2] = LSW(id_list_dma); in qla2x00_get_id_list()
2915 mcp->mb[3] = MSW(MSD(id_list_dma)); in qla2x00_get_id_list()
2916 mcp->mb[6] = LSW(MSD(id_list_dma)); in qla2x00_get_id_list()
2928 *entries = mcp->mb[1]; in qla2x00_get_id_list()
2960 mcp->mb[0] = MBC_GET_RESOURCE_COUNTS; in qla2x00_get_resource_cnts()
2973 "Failed mb[0]=%x.\n", mcp->mb[0]); in qla2x00_get_resource_cnts()
2977 "mb11=%x mb12=%x.\n", __func__, mcp->mb[1], mcp->mb[2], in qla2x00_get_resource_cnts()
2978 mcp->mb[3], mcp->mb[6], mcp->mb[7], mcp->mb[10], in qla2x00_get_resource_cnts()
2979 mcp->mb[11], mcp->mb[12]); in qla2x00_get_resource_cnts()
2981 ha->orig_fw_tgt_xcb_count = mcp->mb[1]; in qla2x00_get_resource_cnts()
2982 ha->cur_fw_tgt_xcb_count = mcp->mb[2]; in qla2x00_get_resource_cnts()
2983 ha->cur_fw_xcb_count = mcp->mb[3]; in qla2x00_get_resource_cnts()
2984 ha->orig_fw_xcb_count = mcp->mb[6]; in qla2x00_get_resource_cnts()
2985 ha->cur_fw_iocb_count = mcp->mb[7]; in qla2x00_get_resource_cnts()
2986 ha->orig_fw_iocb_count = mcp->mb[10]; in qla2x00_get_resource_cnts()
2988 ha->max_npiv_vports = mcp->mb[11]; in qla2x00_get_resource_cnts()
2991 ha->fw_max_fcf_count = mcp->mb[12]; in qla2x00_get_resource_cnts()
3031 mcp->mb[0] = MBC_GET_FC_AL_POSITION_MAP; in qla2x00_get_fcal_position_map()
3032 mcp->mb[2] = MSW(pmap_dma); in qla2x00_get_fcal_position_map()
3033 mcp->mb[3] = LSW(pmap_dma); in qla2x00_get_fcal_position_map()
3034 mcp->mb[6] = MSW(MSD(pmap_dma)); in qla2x00_get_fcal_position_map()
3035 mcp->mb[7] = LSW(MSD(pmap_dma)); in qla2x00_get_fcal_position_map()
3046 mcp->mb[0], mcp->mb[1], (unsigned)pmap[0]); in qla2x00_get_fcal_position_map()
3092 mcp->mb[0] = MBC_GET_LINK_STATUS; in qla2x00_get_link_status()
3093 mcp->mb[2] = MSW(LSD(stats_dma)); in qla2x00_get_link_status()
3094 mcp->mb[3] = LSW(LSD(stats_dma)); in qla2x00_get_link_status()
3095 mcp->mb[6] = MSW(MSD(stats_dma)); in qla2x00_get_link_status()
3096 mcp->mb[7] = LSW(MSD(stats_dma)); in qla2x00_get_link_status()
3100 mcp->mb[1] = loop_id; in qla2x00_get_link_status()
3101 mcp->mb[4] = 0; in qla2x00_get_link_status()
3102 mcp->mb[10] = 0; in qla2x00_get_link_status()
3106 mcp->mb[1] = loop_id; in qla2x00_get_link_status()
3107 mcp->mb[10] = 0; in qla2x00_get_link_status()
3110 mcp->mb[1] = loop_id << 8; in qla2x00_get_link_status()
3118 if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { in qla2x00_get_link_status()
3120 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_link_status()
3151 mc.mb[0] = MBC_GET_LINK_PRIV_STATS; in qla24xx_get_isp_stats()
3152 mc.mb[2] = MSW(LSD(stats_dma)); in qla24xx_get_isp_stats()
3153 mc.mb[3] = LSW(LSD(stats_dma)); in qla24xx_get_isp_stats()
3154 mc.mb[6] = MSW(MSD(stats_dma)); in qla24xx_get_isp_stats()
3155 mc.mb[7] = LSW(MSD(stats_dma)); in qla24xx_get_isp_stats()
3156 mc.mb[8] = dwords; in qla24xx_get_isp_stats()
3157 mc.mb[9] = vha->vp_idx; in qla24xx_get_isp_stats()
3158 mc.mb[10] = options; in qla24xx_get_isp_stats()
3163 if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { in qla24xx_get_isp_stats()
3165 "Failed mb[0]=%x.\n", mcp->mb[0]); in qla24xx_get_isp_stats()
3403 mcp->mb[0] = MBC_GEN_SYSTEM_ERROR; in qla2x00_system_error()
3434 mcp->mb[0] = MBC_WRITE_SERDES; in qla2x00_write_serdes_word()
3435 mcp->mb[1] = addr; in qla2x00_write_serdes_word()
3437 mcp->mb[2] = data & 0xff; in qla2x00_write_serdes_word()
3439 mcp->mb[2] = data; in qla2x00_write_serdes_word()
3441 mcp->mb[3] = 0; in qla2x00_write_serdes_word()
3450 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_write_serdes_word()
3473 mcp->mb[0] = MBC_READ_SERDES; in qla2x00_read_serdes_word()
3474 mcp->mb[1] = addr; in qla2x00_read_serdes_word()
3475 mcp->mb[3] = 0; in qla2x00_read_serdes_word()
3483 *data = mcp->mb[1] & 0xff; in qla2x00_read_serdes_word()
3485 *data = mcp->mb[1]; in qla2x00_read_serdes_word()
3489 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_serdes_word()
3511 mcp->mb[0] = MBC_SET_GET_ETH_SERDES_REG; in qla8044_write_serdes_word()
3512 mcp->mb[1] = HCS_WRITE_SERDES; in qla8044_write_serdes_word()
3513 mcp->mb[3] = LSW(addr); in qla8044_write_serdes_word()
3514 mcp->mb[4] = MSW(addr); in qla8044_write_serdes_word()
3515 mcp->mb[5] = LSW(data); in qla8044_write_serdes_word()
3516 mcp->mb[6] = MSW(data); in qla8044_write_serdes_word()
3525 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla8044_write_serdes_word()
3547 mcp->mb[0] = MBC_SET_GET_ETH_SERDES_REG; in qla8044_read_serdes_word()
3548 mcp->mb[1] = HCS_READ_SERDES; in qla8044_read_serdes_word()
3549 mcp->mb[3] = LSW(addr); in qla8044_read_serdes_word()
3550 mcp->mb[4] = MSW(addr); in qla8044_read_serdes_word()
3557 *data = mcp->mb[2] << 16 | mcp->mb[1]; in qla8044_read_serdes_word()
3561 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla8044_read_serdes_word()
3590 mcp->mb[0] = MBC_SERDES_PARAMS; in qla2x00_set_serdes_params()
3591 mcp->mb[1] = BIT_0; in qla2x00_set_serdes_params()
3592 mcp->mb[2] = sw_em_1g | BIT_15; in qla2x00_set_serdes_params()
3593 mcp->mb[3] = sw_em_2g | BIT_15; in qla2x00_set_serdes_params()
3594 mcp->mb[4] = sw_em_4g | BIT_15; in qla2x00_set_serdes_params()
3604 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_set_serdes_params()
3627 mcp->mb[0] = MBC_STOP_FIRMWARE; in qla2x00_stop_firmware()
3628 mcp->mb[1] = 0; in qla2x00_stop_firmware()
3637 if (mcp->mb[0] == MBS_INVALID_COMMAND) in qla2x00_stop_firmware()
3664 mcp->mb[0] = MBC_TRACE_CONTROL; in qla2x00_enable_eft_trace()
3665 mcp->mb[1] = TC_EFT_ENABLE; in qla2x00_enable_eft_trace()
3666 mcp->mb[2] = LSW(eft_dma); in qla2x00_enable_eft_trace()
3667 mcp->mb[3] = MSW(eft_dma); in qla2x00_enable_eft_trace()
3668 mcp->mb[4] = LSW(MSD(eft_dma)); in qla2x00_enable_eft_trace()
3669 mcp->mb[5] = MSW(MSD(eft_dma)); in qla2x00_enable_eft_trace()
3670 mcp->mb[6] = buffers; in qla2x00_enable_eft_trace()
3671 mcp->mb[7] = TC_AEN_DISABLE; in qla2x00_enable_eft_trace()
3679 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_enable_eft_trace()
3680 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_enable_eft_trace()
3705 mcp->mb[0] = MBC_TRACE_CONTROL; in qla2x00_disable_eft_trace()
3706 mcp->mb[1] = TC_EFT_DISABLE; in qla2x00_disable_eft_trace()
3714 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_disable_eft_trace()
3715 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_disable_eft_trace()
3726 uint16_t buffers, uint16_t *mb, uint32_t *dwords) in qla2x00_enable_fce_trace() argument
3743 mcp->mb[0] = MBC_TRACE_CONTROL; in qla2x00_enable_fce_trace()
3744 mcp->mb[1] = TC_FCE_ENABLE; in qla2x00_enable_fce_trace()
3745 mcp->mb[2] = LSW(fce_dma); in qla2x00_enable_fce_trace()
3746 mcp->mb[3] = MSW(fce_dma); in qla2x00_enable_fce_trace()
3747 mcp->mb[4] = LSW(MSD(fce_dma)); in qla2x00_enable_fce_trace()
3748 mcp->mb[5] = MSW(MSD(fce_dma)); in qla2x00_enable_fce_trace()
3749 mcp->mb[6] = buffers; in qla2x00_enable_fce_trace()
3750 mcp->mb[7] = TC_AEN_DISABLE; in qla2x00_enable_fce_trace()
3751 mcp->mb[8] = 0; in qla2x00_enable_fce_trace()
3752 mcp->mb[9] = TC_FCE_DEFAULT_RX_SIZE; in qla2x00_enable_fce_trace()
3753 mcp->mb[10] = TC_FCE_DEFAULT_TX_SIZE; in qla2x00_enable_fce_trace()
3762 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_enable_fce_trace()
3763 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_enable_fce_trace()
3768 if (mb) in qla2x00_enable_fce_trace()
3769 memcpy(mb, mcp->mb, 8 * sizeof(*mb)); in qla2x00_enable_fce_trace()
3793 mcp->mb[0] = MBC_TRACE_CONTROL; in qla2x00_disable_fce_trace()
3794 mcp->mb[1] = TC_FCE_DISABLE; in qla2x00_disable_fce_trace()
3795 mcp->mb[2] = TC_FCE_DISABLE_TRACE; in qla2x00_disable_fce_trace()
3804 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_disable_fce_trace()
3805 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_disable_fce_trace()
3811 *wr = (uint64_t) mcp->mb[5] << 48 | in qla2x00_disable_fce_trace()
3812 (uint64_t) mcp->mb[4] << 32 | in qla2x00_disable_fce_trace()
3813 (uint64_t) mcp->mb[3] << 16 | in qla2x00_disable_fce_trace()
3814 (uint64_t) mcp->mb[2]; in qla2x00_disable_fce_trace()
3816 *rd = (uint64_t) mcp->mb[9] << 48 | in qla2x00_disable_fce_trace()
3817 (uint64_t) mcp->mb[8] << 32 | in qla2x00_disable_fce_trace()
3818 (uint64_t) mcp->mb[7] << 16 | in qla2x00_disable_fce_trace()
3819 (uint64_t) mcp->mb[6]; in qla2x00_disable_fce_trace()
3827 uint16_t *port_speed, uint16_t *mb) in qla2x00_get_idma_speed() argument
3839 mcp->mb[0] = MBC_PORT_PARAMS; in qla2x00_get_idma_speed()
3840 mcp->mb[1] = loop_id; in qla2x00_get_idma_speed()
3841 mcp->mb[2] = mcp->mb[3] = 0; in qla2x00_get_idma_speed()
3842 mcp->mb[9] = vha->vp_idx; in qla2x00_get_idma_speed()
3850 if (mb) { in qla2x00_get_idma_speed()
3851 mb[0] = mcp->mb[0]; in qla2x00_get_idma_speed()
3852 mb[1] = mcp->mb[1]; in qla2x00_get_idma_speed()
3853 mb[3] = mcp->mb[3]; in qla2x00_get_idma_speed()
3862 *port_speed = mcp->mb[3]; in qla2x00_get_idma_speed()
3870 uint16_t port_speed, uint16_t *mb) in qla2x00_set_idma_speed() argument
3882 mcp->mb[0] = MBC_PORT_PARAMS; in qla2x00_set_idma_speed()
3883 mcp->mb[1] = loop_id; in qla2x00_set_idma_speed()
3884 mcp->mb[2] = BIT_0; in qla2x00_set_idma_speed()
3885 mcp->mb[3] = port_speed & 0x3F; in qla2x00_set_idma_speed()
3886 mcp->mb[9] = vha->vp_idx; in qla2x00_set_idma_speed()
3894 if (mb) { in qla2x00_set_idma_speed()
3895 mb[0] = mcp->mb[0]; in qla2x00_set_idma_speed()
3896 mb[1] = mcp->mb[1]; in qla2x00_set_idma_speed()
3897 mb[3] = mcp->mb[3]; in qla2x00_set_idma_speed()
4250 mcp->mb[0] = MBC_SEND_CHANGE_REQUEST; in qla2x00_send_change_request()
4251 mcp->mb[1] = format; in qla2x00_send_change_request()
4252 mcp->mb[9] = vp_idx; in qla2x00_send_change_request()
4260 if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { in qla2x00_send_change_request()
4281 mcp->mb[0] = MBC_DUMP_RISC_RAM_EXTENDED; in qla2x00_dump_ram()
4282 mcp->mb[8] = MSW(addr); in qla2x00_dump_ram()
4285 mcp->mb[0] = MBC_DUMP_RISC_RAM; in qla2x00_dump_ram()
4288 mcp->mb[1] = LSW(addr); in qla2x00_dump_ram()
4289 mcp->mb[2] = MSW(req_dma); in qla2x00_dump_ram()
4290 mcp->mb[3] = LSW(req_dma); in qla2x00_dump_ram()
4291 mcp->mb[6] = MSW(MSD(req_dma)); in qla2x00_dump_ram()
4292 mcp->mb[7] = LSW(MSD(req_dma)); in qla2x00_dump_ram()
4295 mcp->mb[4] = MSW(size); in qla2x00_dump_ram()
4296 mcp->mb[5] = LSW(size); in qla2x00_dump_ram()
4299 mcp->mb[4] = LSW(size); in qla2x00_dump_ram()
4310 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_dump_ram()
4438 mcp->mb[0] = MBC_INITIALIZE_MULTIQ; in qla25xx_init_req_que()
4439 mcp->mb[1] = req->options; in qla25xx_init_req_que()
4440 mcp->mb[2] = MSW(LSD(req->dma)); in qla25xx_init_req_que()
4441 mcp->mb[3] = LSW(LSD(req->dma)); in qla25xx_init_req_que()
4442 mcp->mb[6] = MSW(MSD(req->dma)); in qla25xx_init_req_que()
4443 mcp->mb[7] = LSW(MSD(req->dma)); in qla25xx_init_req_que()
4444 mcp->mb[5] = req->length; in qla25xx_init_req_que()
4446 mcp->mb[10] = req->rsp->id; in qla25xx_init_req_que()
4447 mcp->mb[12] = req->qos; in qla25xx_init_req_que()
4448 mcp->mb[11] = req->vp_idx; in qla25xx_init_req_que()
4449 mcp->mb[13] = req->rid; in qla25xx_init_req_que()
4451 mcp->mb[15] = 0; in qla25xx_init_req_que()
4453 mcp->mb[4] = req->id; in qla25xx_init_req_que()
4455 mcp->mb[8] = 0; in qla25xx_init_req_que()
4457 mcp->mb[9] = *req->out_ptr = 0; in qla25xx_init_req_que()
4484 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla25xx_init_req_que()
4511 mcp->mb[0] = MBC_INITIALIZE_MULTIQ; in qla25xx_init_rsp_que()
4512 mcp->mb[1] = rsp->options; in qla25xx_init_rsp_que()
4513 mcp->mb[2] = MSW(LSD(rsp->dma)); in qla25xx_init_rsp_que()
4514 mcp->mb[3] = LSW(LSD(rsp->dma)); in qla25xx_init_rsp_que()
4515 mcp->mb[6] = MSW(MSD(rsp->dma)); in qla25xx_init_rsp_que()
4516 mcp->mb[7] = LSW(MSD(rsp->dma)); in qla25xx_init_rsp_que()
4517 mcp->mb[5] = rsp->length; in qla25xx_init_rsp_que()
4518 mcp->mb[14] = rsp->msix->entry; in qla25xx_init_rsp_que()
4519 mcp->mb[13] = rsp->rid; in qla25xx_init_rsp_que()
4521 mcp->mb[15] = 0; in qla25xx_init_rsp_que()
4523 mcp->mb[4] = rsp->id; in qla25xx_init_rsp_que()
4525 mcp->mb[8] = *rsp->in_ptr = 0; in qla25xx_init_rsp_que()
4527 mcp->mb[9] = 0; in qla25xx_init_rsp_que()
4556 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla25xx_init_rsp_que()
4566 qla81xx_idc_ack(scsi_qla_host_t *vha, uint16_t *mb) in qla81xx_idc_ack() argument
4575 mcp->mb[0] = MBC_IDC_ACK; in qla81xx_idc_ack()
4576 memcpy(&mcp->mb[1], mb, QLA_IDC_ACK_REGS * sizeof(uint16_t)); in qla81xx_idc_ack()
4585 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_idc_ack()
4608 mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; in qla81xx_fac_get_sector_size()
4609 mcp->mb[1] = FAC_OPT_CMD_GET_SECTOR_SIZE; in qla81xx_fac_get_sector_size()
4618 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla81xx_fac_get_sector_size()
4619 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_fac_get_sector_size()
4623 *sector_size = mcp->mb[1]; in qla81xx_fac_get_sector_size()
4643 mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; in qla81xx_fac_do_write_enable()
4644 mcp->mb[1] = enable ? FAC_OPT_CMD_WRITE_ENABLE : in qla81xx_fac_do_write_enable()
4654 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla81xx_fac_do_write_enable()
4655 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_fac_do_write_enable()
4678 mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; in qla81xx_fac_erase_sector()
4679 mcp->mb[1] = FAC_OPT_CMD_ERASE_SECTOR; in qla81xx_fac_erase_sector()
4680 mcp->mb[2] = LSW(start); in qla81xx_fac_erase_sector()
4681 mcp->mb[3] = MSW(start); in qla81xx_fac_erase_sector()
4682 mcp->mb[4] = LSW(finish); in qla81xx_fac_erase_sector()
4683 mcp->mb[5] = MSW(finish); in qla81xx_fac_erase_sector()
4692 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla81xx_fac_erase_sector()
4693 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla81xx_fac_erase_sector()
4717 mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; in qla81xx_fac_semaphore_access()
4718 mcp->mb[1] = (lock ? FAC_OPT_CMD_LOCK_SEMAPHORE : in qla81xx_fac_semaphore_access()
4728 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla81xx_fac_semaphore_access()
4729 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla81xx_fac_semaphore_access()
4748 mcp->mb[0] = MBC_RESTART_MPI_FW; in qla81xx_restart_mpi_firmware()
4757 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla81xx_restart_mpi_firmware()
4758 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_restart_mpi_firmware()
4787 mcp->mb[0] = MBC_SET_RNID_PARAMS; in qla82xx_set_driver_version()
4788 mcp->mb[1] = RNID_TYPE_SET_VERSION << 8; in qla82xx_set_driver_version()
4791 mcp->mb[i] = le16_to_cpup(str); in qla82xx_set_driver_version()
4795 mcp->mb[i] = 0; in qla82xx_set_driver_version()
4805 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla82xx_set_driver_version()
4848 mcp->mb[0] = MBC_SET_RNID_PARAMS; in qla25xx_set_driver_version()
4849 mcp->mb[1] = RNID_TYPE_SET_VERSION << 8 | dwlen; in qla25xx_set_driver_version()
4850 mcp->mb[2] = MSW(LSD(str_dma)); in qla25xx_set_driver_version()
4851 mcp->mb[3] = LSW(LSD(str_dma)); in qla25xx_set_driver_version()
4852 mcp->mb[6] = MSW(MSD(str_dma)); in qla25xx_set_driver_version()
4853 mcp->mb[7] = LSW(MSD(str_dma)); in qla25xx_set_driver_version()
4862 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla25xx_set_driver_version()
4888 mcp->mb[0] = MBC_GET_RNID_PARAMS; in qla24xx_get_port_login_templ()
4889 mcp->mb[1] = RNID_TYPE_PORT_LOGIN << 8; in qla24xx_get_port_login_templ()
4890 mcp->mb[2] = MSW(buf_dma); in qla24xx_get_port_login_templ()
4891 mcp->mb[3] = LSW(buf_dma); in qla24xx_get_port_login_templ()
4892 mcp->mb[6] = MSW(MSD(buf_dma)); in qla24xx_get_port_login_templ()
4893 mcp->mb[7] = LSW(MSD(buf_dma)); in qla24xx_get_port_login_templ()
4894 mcp->mb[8] = bufsiz/4; in qla24xx_get_port_login_templ()
4903 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla24xx_get_port_login_templ()
4953 mcp->mb[0] = MBC_SET_RNID_PARAMS; in qla25xx_set_els_cmds_supported()
4954 mcp->mb[1] = RNID_TYPE_ELS_CMD << 8; in qla25xx_set_els_cmds_supported()
4955 mcp->mb[2] = MSW(LSD(els_cmd_map_dma)); in qla25xx_set_els_cmds_supported()
4956 mcp->mb[3] = LSW(LSD(els_cmd_map_dma)); in qla25xx_set_els_cmds_supported()
4957 mcp->mb[6] = MSW(MSD(els_cmd_map_dma)); in qla25xx_set_els_cmds_supported()
4958 mcp->mb[7] = LSW(MSD(els_cmd_map_dma)); in qla25xx_set_els_cmds_supported()
4968 "Failed=%x (%x,%x).\n", rval, mcp->mb[0], mcp->mb[1]); in qla25xx_set_els_cmds_supported()
4993 mcp->mb[0] = MBC_GET_RNID_PARAMS; in qla2x00_read_asic_temperature()
4994 mcp->mb[1] = RNID_TYPE_ASIC_TEMP << 8; in qla2x00_read_asic_temperature()
5000 *temp = mcp->mb[1]; in qla2x00_read_asic_temperature()
5004 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla2x00_read_asic_temperature()
5031 mcp->mb[0] = MBC_READ_SFP; in qla2x00_read_sfp()
5032 mcp->mb[1] = dev; in qla2x00_read_sfp()
5033 mcp->mb[2] = MSW(LSD(sfp_dma)); in qla2x00_read_sfp()
5034 mcp->mb[3] = LSW(LSD(sfp_dma)); in qla2x00_read_sfp()
5035 mcp->mb[6] = MSW(MSD(sfp_dma)); in qla2x00_read_sfp()
5036 mcp->mb[7] = LSW(MSD(sfp_dma)); in qla2x00_read_sfp()
5037 mcp->mb[8] = len; in qla2x00_read_sfp()
5038 mcp->mb[9] = off; in qla2x00_read_sfp()
5039 mcp->mb[10] = opt; in qla2x00_read_sfp()
5047 *sfp = mcp->mb[1]; in qla2x00_read_sfp()
5051 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_sfp()
5052 if (mcp->mb[0] == MBS_COMMAND_ERROR && mcp->mb[1] == 0x22) { in qla2x00_read_sfp()
5085 mcp->mb[0] = MBC_WRITE_SFP; in qla2x00_write_sfp()
5086 mcp->mb[1] = dev; in qla2x00_write_sfp()
5087 mcp->mb[2] = MSW(LSD(sfp_dma)); in qla2x00_write_sfp()
5088 mcp->mb[3] = LSW(LSD(sfp_dma)); in qla2x00_write_sfp()
5089 mcp->mb[6] = MSW(MSD(sfp_dma)); in qla2x00_write_sfp()
5090 mcp->mb[7] = LSW(MSD(sfp_dma)); in qla2x00_write_sfp()
5091 mcp->mb[8] = len; in qla2x00_write_sfp()
5092 mcp->mb[9] = off; in qla2x00_write_sfp()
5093 mcp->mb[10] = opt; in qla2x00_write_sfp()
5102 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_write_sfp()
5125 mcp->mb[0] = MBC_GET_XGMAC_STATS; in qla2x00_get_xgmac_stats()
5126 mcp->mb[2] = MSW(stats_dma); in qla2x00_get_xgmac_stats()
5127 mcp->mb[3] = LSW(stats_dma); in qla2x00_get_xgmac_stats()
5128 mcp->mb[6] = MSW(MSD(stats_dma)); in qla2x00_get_xgmac_stats()
5129 mcp->mb[7] = LSW(MSD(stats_dma)); in qla2x00_get_xgmac_stats()
5130 mcp->mb[8] = size_in_bytes >> 2; in qla2x00_get_xgmac_stats()
5139 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla2x00_get_xgmac_stats()
5140 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_get_xgmac_stats()
5146 *actual_size = mcp->mb[2] << 2; in qla2x00_get_xgmac_stats()
5166 mcp->mb[0] = MBC_GET_DCBX_PARAMS; in qla2x00_get_dcbx_params()
5167 mcp->mb[1] = 0; in qla2x00_get_dcbx_params()
5168 mcp->mb[2] = MSW(tlv_dma); in qla2x00_get_dcbx_params()
5169 mcp->mb[3] = LSW(tlv_dma); in qla2x00_get_dcbx_params()
5170 mcp->mb[6] = MSW(MSD(tlv_dma)); in qla2x00_get_dcbx_params()
5171 mcp->mb[7] = LSW(MSD(tlv_dma)); in qla2x00_get_dcbx_params()
5172 mcp->mb[8] = size; in qla2x00_get_dcbx_params()
5181 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla2x00_get_dcbx_params()
5182 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_get_dcbx_params()
5204 mcp->mb[0] = MBC_READ_RAM_EXTENDED; in qla2x00_read_ram_word()
5205 mcp->mb[1] = LSW(risc_addr); in qla2x00_read_ram_word()
5206 mcp->mb[8] = MSW(risc_addr); in qla2x00_read_ram_word()
5214 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_ram_word()
5218 *data = mcp->mb[3] << 16 | mcp->mb[2]; in qla2x00_read_ram_word()
5235 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla2x00_loopback_test()
5236 mcp->mb[0] = MBC_DIAGNOSTIC_LOOP_BACK; in qla2x00_loopback_test()
5237 mcp->mb[1] = mreq->options | BIT_6; // BIT_6 specifies 64 bit addressing in qla2x00_loopback_test()
5240 mcp->mb[10] = LSW(mreq->transfer_size); in qla2x00_loopback_test()
5241 mcp->mb[11] = MSW(mreq->transfer_size); in qla2x00_loopback_test()
5244 mcp->mb[14] = LSW(mreq->send_dma); in qla2x00_loopback_test()
5245 mcp->mb[15] = MSW(mreq->send_dma); in qla2x00_loopback_test()
5246 mcp->mb[20] = LSW(MSD(mreq->send_dma)); in qla2x00_loopback_test()
5247 mcp->mb[21] = MSW(MSD(mreq->send_dma)); in qla2x00_loopback_test()
5250 mcp->mb[16] = LSW(mreq->rcv_dma); in qla2x00_loopback_test()
5251 mcp->mb[17] = MSW(mreq->rcv_dma); in qla2x00_loopback_test()
5252 mcp->mb[6] = LSW(MSD(mreq->rcv_dma)); in qla2x00_loopback_test()
5253 mcp->mb[7] = MSW(MSD(mreq->rcv_dma)); in qla2x00_loopback_test()
5256 mcp->mb[18] = LSW(mreq->iteration_count); in qla2x00_loopback_test()
5257 mcp->mb[19] = MSW(mreq->iteration_count); in qla2x00_loopback_test()
5273 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x mb[3]=%x mb[18]=%x " in qla2x00_loopback_test()
5274 "mb[19]=%x.\n", rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], in qla2x00_loopback_test()
5275 mcp->mb[3], mcp->mb[18], mcp->mb[19]); in qla2x00_loopback_test()
5282 memcpy( mresp, mcp->mb, 64); in qla2x00_loopback_test()
5298 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla2x00_echo_test()
5299 mcp->mb[0] = MBC_DIAGNOSTIC_ECHO; in qla2x00_echo_test()
5301 mcp->mb[1] = mreq->options | BIT_15 | BIT_6; in qla2x00_echo_test()
5303 mcp->mb[2] = vha->fcoe_fcf_idx; in qla2x00_echo_test()
5305 mcp->mb[16] = LSW(mreq->rcv_dma); in qla2x00_echo_test()
5306 mcp->mb[17] = MSW(mreq->rcv_dma); in qla2x00_echo_test()
5307 mcp->mb[6] = LSW(MSD(mreq->rcv_dma)); in qla2x00_echo_test()
5308 mcp->mb[7] = MSW(MSD(mreq->rcv_dma)); in qla2x00_echo_test()
5310 mcp->mb[10] = LSW(mreq->transfer_size); in qla2x00_echo_test()
5312 mcp->mb[14] = LSW(mreq->send_dma); in qla2x00_echo_test()
5313 mcp->mb[15] = MSW(mreq->send_dma); in qla2x00_echo_test()
5314 mcp->mb[20] = LSW(MSD(mreq->send_dma)); in qla2x00_echo_test()
5315 mcp->mb[21] = MSW(MSD(mreq->send_dma)); in qla2x00_echo_test()
5338 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_echo_test()
5339 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_echo_test()
5346 memcpy(mresp, mcp->mb, 64); in qla2x00_echo_test()
5360 mcp->mb[0] = MBC_ISP84XX_RESET; in qla84xx_reset_chip()
5361 mcp->mb[1] = enable_diagnostic; in qla84xx_reset_chip()
5390 mcp->mb[0] = MBC_WRITE_RAM_WORD_EXTENDED; in qla2x00_write_ram_word()
5391 mcp->mb[1] = LSW(risc_addr); in qla2x00_write_ram_word()
5392 mcp->mb[2] = LSW(data); in qla2x00_write_ram_word()
5393 mcp->mb[3] = MSW(data); in qla2x00_write_ram_word()
5394 mcp->mb[8] = MSW(risc_addr); in qla2x00_write_ram_word()
5402 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_write_ram_word()
5403 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_write_ram_word()
5413 qla81xx_write_mpi_register(scsi_qla_host_t *vha, uint16_t *mb) in qla81xx_write_mpi_register() argument
5430 wrt_reg_word(®->mailbox1, mb[0]); in qla81xx_write_mpi_register()
5431 wrt_reg_word(®->mailbox2, mb[1]); in qla81xx_write_mpi_register()
5432 wrt_reg_word(®->mailbox3, mb[2]); in qla81xx_write_mpi_register()
5433 wrt_reg_word(®->mailbox4, mb[3]); in qla81xx_write_mpi_register()
5465 "Failed=%x mb[0]=%x.\n", rval, mb[0]); in qla81xx_write_mpi_register()
5508 mcp->mb[0] = MBC_DATA_RATE; in qla2x00_set_data_rate()
5509 mcp->mb[1] = mode; in qla2x00_set_data_rate()
5510 mcp->mb[2] = val; in qla2x00_set_data_rate()
5521 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_set_data_rate()
5523 if (mcp->mb[1] != 0x7) in qla2x00_set_data_rate()
5525 "Speed set:0x%x\n", mcp->mb[1]); in qla2x00_set_data_rate()
5548 mcp->mb[0] = MBC_DATA_RATE; in qla2x00_get_data_rate()
5549 mcp->mb[1] = QLA_GET_DATA_RATE; in qla2x00_get_data_rate()
5559 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_data_rate()
5561 if (mcp->mb[1] != 0x7) in qla2x00_get_data_rate()
5562 ha->link_data_rate = mcp->mb[1]; in qla2x00_get_data_rate()
5565 if (mcp->mb[4] & BIT_0) in qla2x00_get_data_rate()
5572 if (mcp->mb[1] != 0x7) in qla2x00_get_data_rate()
5573 ha->link_data_rate = mcp->mb[1]; in qla2x00_get_data_rate()
5580 qla81xx_get_port_config(scsi_qla_host_t *vha, uint16_t *mb) in qla81xx_get_port_config() argument
5593 mcp->mb[0] = MBC_GET_PORT_CONFIG; in qla81xx_get_port_config()
5603 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_get_port_config()
5606 memcpy(mb, &mcp->mb[1], sizeof(uint16_t) * 4); in qla81xx_get_port_config()
5615 qla81xx_set_port_config(scsi_qla_host_t *vha, uint16_t *mb) in qla81xx_set_port_config() argument
5624 mcp->mb[0] = MBC_SET_PORT_CONFIG; in qla81xx_set_port_config()
5626 memcpy(&mcp->mb[1], mb, sizeof(uint16_t) * 4); in qla81xx_set_port_config()
5635 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_set_port_config()
5646 uint16_t *mb) in qla24xx_set_fcp_prio() argument
5659 mcp->mb[0] = MBC_PORT_PARAMS; in qla24xx_set_fcp_prio()
5660 mcp->mb[1] = loop_id; in qla24xx_set_fcp_prio()
5662 mcp->mb[2] = BIT_1; in qla24xx_set_fcp_prio()
5664 mcp->mb[2] = BIT_2; in qla24xx_set_fcp_prio()
5665 mcp->mb[4] = priority & 0xf; in qla24xx_set_fcp_prio()
5666 mcp->mb[9] = vha->vp_idx; in qla24xx_set_fcp_prio()
5672 if (mb != NULL) { in qla24xx_set_fcp_prio()
5673 mb[0] = mcp->mb[0]; in qla24xx_set_fcp_prio()
5674 mb[1] = mcp->mb[1]; in qla24xx_set_fcp_prio()
5675 mb[3] = mcp->mb[3]; in qla24xx_set_fcp_prio()
5676 mb[4] = mcp->mb[4]; in qla24xx_set_fcp_prio()
5751 mcp->mb[0] = MBC_TOGGLE_INTERRUPT; in qla82xx_mbx_intr_enable()
5752 mcp->mb[1] = 1; in qla82xx_mbx_intr_enable()
5762 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_intr_enable()
5786 mcp->mb[0] = MBC_TOGGLE_INTERRUPT; in qla82xx_mbx_intr_disable()
5787 mcp->mb[1] = 0; in qla82xx_mbx_intr_disable()
5797 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_intr_disable()
5817 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla82xx_md_get_template_size()
5818 mcp->mb[0] = LSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla82xx_md_get_template_size()
5819 mcp->mb[1] = MSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla82xx_md_get_template_size()
5820 mcp->mb[2] = LSW(RQST_TMPLT_SIZE); in qla82xx_md_get_template_size()
5821 mcp->mb[3] = MSW(RQST_TMPLT_SIZE); in qla82xx_md_get_template_size()
5835 (mcp->mb[1] << 16) | mcp->mb[0], in qla82xx_md_get_template_size()
5836 (mcp->mb[3] << 16) | mcp->mb[2]); in qla82xx_md_get_template_size()
5840 ha->md_template_size = ((mcp->mb[3] << 16) | mcp->mb[2]); in qla82xx_md_get_template_size()
5869 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla82xx_md_get_template()
5870 mcp->mb[0] = LSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla82xx_md_get_template()
5871 mcp->mb[1] = MSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla82xx_md_get_template()
5872 mcp->mb[2] = LSW(RQST_TMPLT); in qla82xx_md_get_template()
5873 mcp->mb[3] = MSW(RQST_TMPLT); in qla82xx_md_get_template()
5874 mcp->mb[4] = LSW(LSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5875 mcp->mb[5] = MSW(LSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5876 mcp->mb[6] = LSW(MSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5877 mcp->mb[7] = MSW(MSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5878 mcp->mb[8] = LSW(ha->md_template_size); in qla82xx_md_get_template()
5879 mcp->mb[9] = MSW(ha->md_template_size); in qla82xx_md_get_template()
5891 ((mcp->mb[1] << 16) | mcp->mb[0]), in qla82xx_md_get_template()
5892 ((mcp->mb[3] << 16) | mcp->mb[2])); in qla82xx_md_get_template()
5919 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla8044_md_get_template()
5921 mcp->mb[0] = LSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla8044_md_get_template()
5922 mcp->mb[1] = MSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla8044_md_get_template()
5923 mcp->mb[2] = LSW(RQST_TMPLT); in qla8044_md_get_template()
5924 mcp->mb[3] = MSW(RQST_TMPLT); in qla8044_md_get_template()
5925 mcp->mb[4] = LSW(LSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
5926 mcp->mb[5] = MSW(LSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
5927 mcp->mb[6] = LSW(MSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
5928 mcp->mb[7] = MSW(MSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
5929 mcp->mb[8] = LSW(size); in qla8044_md_get_template()
5930 mcp->mb[9] = MSW(size); in qla8044_md_get_template()
5931 mcp->mb[10] = offset & 0x0000FFFF; in qla8044_md_get_template()
5932 mcp->mb[11] = offset & 0xFFFF0000; in qla8044_md_get_template()
5943 ((mcp->mb[1] << 16) | mcp->mb[0]), in qla8044_md_get_template()
5944 ((mcp->mb[3] << 16) | mcp->mb[2])); in qla8044_md_get_template()
5969 mcp->mb[0] = MBC_SET_LED_CONFIG; in qla81xx_set_led_config()
5970 mcp->mb[1] = led_cfg[0]; in qla81xx_set_led_config()
5971 mcp->mb[2] = led_cfg[1]; in qla81xx_set_led_config()
5973 mcp->mb[3] = led_cfg[2]; in qla81xx_set_led_config()
5974 mcp->mb[4] = led_cfg[3]; in qla81xx_set_led_config()
5975 mcp->mb[5] = led_cfg[4]; in qla81xx_set_led_config()
5976 mcp->mb[6] = led_cfg[5]; in qla81xx_set_led_config()
5989 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_set_led_config()
6013 mcp->mb[0] = MBC_GET_LED_CONFIG; in qla81xx_get_led_config()
6025 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_get_led_config()
6027 led_cfg[0] = mcp->mb[1]; in qla81xx_get_led_config()
6028 led_cfg[1] = mcp->mb[2]; in qla81xx_get_led_config()
6030 led_cfg[2] = mcp->mb[3]; in qla81xx_get_led_config()
6031 led_cfg[3] = mcp->mb[4]; in qla81xx_get_led_config()
6032 led_cfg[4] = mcp->mb[5]; in qla81xx_get_led_config()
6033 led_cfg[5] = mcp->mb[6]; in qla81xx_get_led_config()
6057 mcp->mb[0] = MBC_SET_LED_CONFIG; in qla82xx_mbx_beacon_ctl()
6059 mcp->mb[7] = 0xE; in qla82xx_mbx_beacon_ctl()
6061 mcp->mb[7] = 0xD; in qla82xx_mbx_beacon_ctl()
6071 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_beacon_ctl()
6094 mcp->mb[0] = MBC_WRITE_REMOTE_REG; in qla83xx_wr_reg()
6095 mcp->mb[1] = LSW(reg); in qla83xx_wr_reg()
6096 mcp->mb[2] = MSW(reg); in qla83xx_wr_reg()
6097 mcp->mb[3] = LSW(data); in qla83xx_wr_reg()
6098 mcp->mb[4] = MSW(data); in qla83xx_wr_reg()
6108 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla83xx_wr_reg()
6136 mcp->mb[0] = MBC_PORT_LOGOUT; in qla2x00_port_logout()
6137 mcp->mb[1] = fcport->loop_id; in qla2x00_port_logout()
6138 mcp->mb[10] = BIT_15; in qla2x00_port_logout()
6146 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_port_logout()
6169 mcp->mb[0] = MBC_READ_REMOTE_REG; in qla83xx_rd_reg()
6170 mcp->mb[1] = LSW(reg); in qla83xx_rd_reg()
6171 mcp->mb[2] = MSW(reg); in qla83xx_rd_reg()
6180 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla83xx_rd_reg()
6181 rval, mcp->mb[0], mcp->mb[1]); in qla83xx_rd_reg()
6183 *data = (mcp->mb[3] | (mcp->mb[4] << 16)); in qla83xx_rd_reg()
6218 mcp->mb[0] = MBC_RESTART_NIC_FIRMWARE; in qla83xx_restart_nic_firmware()
6227 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla83xx_restart_nic_firmware()
6228 rval, mcp->mb[0], mcp->mb[1]); in qla83xx_restart_nic_firmware()
6252 mcp->mb[0] = MBC_SET_ACCESS_CONTROL; in qla83xx_access_control()
6253 mcp->mb[1] = options; in qla83xx_access_control()
6256 mcp->mb[2] = LSW(start_addr); in qla83xx_access_control()
6257 mcp->mb[3] = MSW(start_addr); in qla83xx_access_control()
6258 mcp->mb[4] = LSW(end_addr); in qla83xx_access_control()
6259 mcp->mb[5] = MSW(end_addr); in qla83xx_access_control()
6271 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x mb[3]=%x mb[4]=%x.\n", in qla83xx_access_control()
6272 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3], in qla83xx_access_control()
6273 mcp->mb[4]); in qla83xx_access_control()
6277 *sector_size = mcp->mb[1]; in qla83xx_access_control()
6280 "Driver-lock id=%x%x", mcp->mb[4], mcp->mb[3]); in qla83xx_access_control()
6283 "Flash-lock id=%x%x", mcp->mb[4], mcp->mb[3]); in qla83xx_access_control()
6305 mcp->mb[0] = MBC_DUMP_RISC_RAM_EXTENDED; in qla2x00_dump_mctp_data()
6306 mcp->mb[1] = LSW(addr); in qla2x00_dump_mctp_data()
6307 mcp->mb[2] = MSW(req_dma); in qla2x00_dump_mctp_data()
6308 mcp->mb[3] = LSW(req_dma); in qla2x00_dump_mctp_data()
6309 mcp->mb[4] = MSW(size); in qla2x00_dump_mctp_data()
6310 mcp->mb[5] = LSW(size); in qla2x00_dump_mctp_data()
6311 mcp->mb[6] = MSW(MSD(req_dma)); in qla2x00_dump_mctp_data()
6312 mcp->mb[7] = LSW(MSD(req_dma)); in qla2x00_dump_mctp_data()
6313 mcp->mb[8] = MSW(addr); in qla2x00_dump_mctp_data()
6316 mcp->mb[10] = BIT_7 | 0x40; in qla2x00_dump_mctp_data()
6328 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_dump_mctp_data()
6362 mcp->mb[0] = MBC_DPORT_DIAGNOSTICS; in qla26xx_dport_diagnostics()
6363 mcp->mb[1] = options; in qla26xx_dport_diagnostics()
6364 mcp->mb[2] = MSW(LSD(dd_dma)); in qla26xx_dport_diagnostics()
6365 mcp->mb[3] = LSW(LSD(dd_dma)); in qla26xx_dport_diagnostics()
6366 mcp->mb[6] = MSW(MSD(dd_dma)); in qla26xx_dport_diagnostics()
6367 mcp->mb[7] = LSW(MSD(dd_dma)); in qla26xx_dport_diagnostics()
6368 mcp->mb[8] = size; in qla26xx_dport_diagnostics()
6398 * This mailbox uses the iocb interface to send MB command.
6416 sp->name = mb_to_str(mcp->mb[0]); in qla24xx_send_mb_cmd()
6424 memcpy(sp->u.iocb_cmd.u.mbx.out_mb, mcp->mb, SIZEOF_IOCB_MB_REG); in qla24xx_send_mb_cmd()
6436 ql_dbg(ql_dbg_mbx, vha, 0x113f, "MB:%s hndl %x submitted\n", in qla24xx_send_mb_cmd()
6440 memcpy(mcp->mb, sp->u.iocb_cmd.u.mbx.in_mb, SIZEOF_IOCB_MB_REG); in qla24xx_send_mb_cmd()
6487 mc.mb[0] = MBC_GET_PORT_DATABASE; in qla24xx_gpdb_wait()
6488 mc.mb[1] = fcport->loop_id; in qla24xx_gpdb_wait()
6489 mc.mb[2] = MSW(pd_dma); in qla24xx_gpdb_wait()
6490 mc.mb[3] = LSW(pd_dma); in qla24xx_gpdb_wait()
6491 mc.mb[6] = MSW(MSD(pd_dma)); in qla24xx_gpdb_wait()
6492 mc.mb[7] = LSW(MSD(pd_dma)); in qla24xx_gpdb_wait()
6493 mc.mb[9] = vha->vp_idx; in qla24xx_gpdb_wait()
6494 mc.mb[10] = opt; in qla24xx_gpdb_wait()
6599 mc.mb[0] = MBC_GET_ID_LIST; in qla24xx_gidlist_wait()
6600 mc.mb[2] = MSW(id_list_dma); in qla24xx_gidlist_wait()
6601 mc.mb[3] = LSW(id_list_dma); in qla24xx_gidlist_wait()
6602 mc.mb[6] = MSW(MSD(id_list_dma)); in qla24xx_gidlist_wait()
6603 mc.mb[7] = LSW(MSD(id_list_dma)); in qla24xx_gidlist_wait()
6604 mc.mb[8] = 0; in qla24xx_gidlist_wait()
6605 mc.mb[9] = vha->vp_idx; in qla24xx_gidlist_wait()
6612 *entries = mc.mb[1]; in qla24xx_gidlist_wait()
6629 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla27xx_set_zio_threshold()
6630 mcp->mb[0] = MBC_GET_SET_ZIO_THRESHOLD; in qla27xx_set_zio_threshold()
6631 mcp->mb[1] = 1; in qla27xx_set_zio_threshold()
6632 mcp->mb[2] = value; in qla27xx_set_zio_threshold()
6655 memset(mcp->mb, 0, sizeof(mcp->mb)); in qla27xx_get_zio_threshold()
6656 mcp->mb[0] = MBC_GET_SET_ZIO_THRESHOLD; in qla27xx_get_zio_threshold()
6657 mcp->mb[1] = 0; in qla27xx_get_zio_threshold()
6665 *value = mc.mb[2]; in qla27xx_get_zio_threshold()
6735 mc.mb[0] = MBC_GET_RESOURCE_COUNTS; in qla24xx_res_count_wait()
6743 memcpy(out_mb, mc.mb, out_mb_sz); in qla24xx_res_count_wait()
6745 memcpy(out_mb, mc.mb, SIZEOF_IOCB_MB_REG); in qla24xx_res_count_wait()
6762 mcp->mb[0] = MBC_SECURE_FLASH_UPDATE; in qla28xx_secure_flash_update()
6763 mcp->mb[1] = opts; in qla28xx_secure_flash_update()
6764 mcp->mb[2] = region; in qla28xx_secure_flash_update()
6765 mcp->mb[3] = MSW(len); in qla28xx_secure_flash_update()
6766 mcp->mb[4] = LSW(len); in qla28xx_secure_flash_update()
6767 mcp->mb[5] = MSW(sfub_dma_addr); in qla28xx_secure_flash_update()
6768 mcp->mb[6] = LSW(sfub_dma_addr); in qla28xx_secure_flash_update()
6769 mcp->mb[7] = MSW(MSD(sfub_dma_addr)); in qla28xx_secure_flash_update()
6770 mcp->mb[8] = LSW(MSD(sfub_dma_addr)); in qla28xx_secure_flash_update()
6771 mcp->mb[9] = sfub_len; in qla28xx_secure_flash_update()
6781 __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1], in qla28xx_secure_flash_update()
6782 mcp->mb[2]); in qla28xx_secure_flash_update()
6798 mcp->mb[0] = MBC_WRITE_REMOTE_REG; in qla2xxx_write_remote_register()
6799 mcp->mb[1] = LSW(addr); in qla2xxx_write_remote_register()
6800 mcp->mb[2] = MSW(addr); in qla2xxx_write_remote_register()
6801 mcp->mb[3] = LSW(data); in qla2xxx_write_remote_register()
6802 mcp->mb[4] = MSW(data); in qla2xxx_write_remote_register()
6811 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2xxx_write_remote_register()
6830 mcp->mb[0] = MBC_READ_REMOTE_REG; in qla2xxx_read_remote_register()
6831 mcp->mb[1] = LSW(addr); in qla2xxx_read_remote_register()
6832 mcp->mb[2] = MSW(addr); in qla2xxx_read_remote_register()
6839 *data = (uint32_t)((((uint32_t)mcp->mb[4]) << 16) | mcp->mb[3]); in qla2xxx_read_remote_register()
6843 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2xxx_read_remote_register()
6866 mcp->mb[0] = MBC_SET_GET_FC_LED_CONFIG; in ql26xx_led_config()
6867 mcp->mb[1] = options; in ql26xx_led_config()
6872 mcp->mb[2] = led[2]; in ql26xx_led_config()
6876 mcp->mb[3] = led[0]; in ql26xx_led_config()
6880 mcp->mb[4] = led[1]; in ql26xx_led_config()
6890 ql_dbg(ql_dbg_mbx, vha, 0x7071, "Failed %s %x (mb=%x,%x)\n", in ql26xx_led_config()
6891 __func__, rval, mcp->mb[0], mcp->mb[1]); in ql26xx_led_config()
6899 led[2] = mcp->mb[2]; in ql26xx_led_config()
6900 led[0] = mcp->mb[3]; in ql26xx_led_config()
6901 led[1] = mcp->mb[4]; in ql26xx_led_config()