Lines Matching full:mb
95 * mb[MAX_MAILBOX_REGISTER_COUNT] = returned mailbox data.
161 mcp->mb[0] = MBS_LINK_DOWN_ERROR; in qla2x00_mailbox_command()
171 !is_rom_cmd(mcp->mb[0])) || ha->flags.eeh_busy) { in qla2x00_mailbox_command()
174 mcp->mb[0]); in qla2x00_mailbox_command()
188 mcp->mb[0]); in qla2x00_mailbox_command()
198 ha->flags.purge_mbox, ha->flags.eeh_busy, mcp->mb[0]); in qla2x00_mailbox_command()
208 "Prepare to issue mbox cmd=0x%x.\n", mcp->mb[0]); in qla2x00_mailbox_command()
228 iptr = mcp->mb; in qla2x00_mailbox_command()
229 command = mcp->mb[0]; in qla2x00_mailbox_command()
383 mcp->mb[0] = MBS_LINK_DOWN_ERROR; in qla2x00_mailbox_command()
399 iptr2 = mcp->mb; in qla2x00_mailbox_command()
418 uint16_t mb[8]; in qla2x00_mailbox_command() local
423 mb[0] = rd_reg_word(®->isp24.mailbox0); in qla2x00_mailbox_command()
424 mb[1] = rd_reg_word(®->isp24.mailbox1); in qla2x00_mailbox_command()
425 mb[2] = rd_reg_word(®->isp24.mailbox2); in qla2x00_mailbox_command()
426 mb[3] = rd_reg_word(®->isp24.mailbox3); in qla2x00_mailbox_command()
427 mb[7] = rd_reg_word(®->isp24.mailbox7); in qla2x00_mailbox_command()
434 "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()
435 command, ictrl, jiffies, mb[0], mb[1], mb[2], mb[3], in qla2x00_mailbox_command()
436 mb[7], host_status, hccr); in qla2x00_mailbox_command()
440 mb[0] = RD_MAILBOX_REG(ha, ®->isp, 0); in qla2x00_mailbox_command()
444 "mb[0]=0x%x\n", command, ictrl, jiffies, mb[0]); in qla2x00_mailbox_command()
473 if (mcp->mb[0] != MBC_GEN_SYSTEM_ERROR) in qla2x00_mailbox_command()
494 mcp->mb[0] != MBC_GEN_SYSTEM_ERROR) { in qla2x00_mailbox_command()
515 "mb[0]=0x%x, eeh_busy=0x%x. Scheduling ISP " in qla2x00_mailbox_command()
516 "abort.\n", command, mcp->mb[0], in qla2x00_mailbox_command()
541 "mb[0]=0x%x. Scheduling ISP abort ", in qla2x00_mailbox_command()
542 command, mcp->mb[0]); in qla2x00_mailbox_command()
570 mcp->mb[0]); in qla2x00_mailbox_command()
580 printk(" mb[%u]=%x", i, mcp->mb[i]); in qla2x00_mailbox_command()
629 mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; in qla2x00_load_ram()
630 mcp->mb[8] = MSW(risc_addr); in qla2x00_load_ram()
633 mcp->mb[0] = MBC_LOAD_RISC_RAM; in qla2x00_load_ram()
636 mcp->mb[1] = LSW(risc_addr); in qla2x00_load_ram()
637 mcp->mb[2] = MSW(req_dma); in qla2x00_load_ram()
638 mcp->mb[3] = LSW(req_dma); in qla2x00_load_ram()
639 mcp->mb[6] = MSW(MSD(req_dma)); in qla2x00_load_ram()
640 mcp->mb[7] = LSW(MSD(req_dma)); in qla2x00_load_ram()
643 mcp->mb[4] = MSW(risc_code_size); in qla2x00_load_ram()
644 mcp->mb[5] = LSW(risc_code_size); in qla2x00_load_ram()
647 mcp->mb[4] = LSW(risc_code_size); in qla2x00_load_ram()
658 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_load_ram()
659 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_load_ram()
702 mcp->mb[0] = MBC_EXECUTE_FIRMWARE; in qla2x00_execute_fw()
706 mcp->mb[1] = MSW(risc_addr); in qla2x00_execute_fw()
707 mcp->mb[2] = LSW(risc_addr); in qla2x00_execute_fw()
708 mcp->mb[3] = 0; in qla2x00_execute_fw()
709 mcp->mb[4] = 0; in qla2x00_execute_fw()
710 mcp->mb[11] = 0; in qla2x00_execute_fw()
714 mcp->mb[4] = BIT_0; in qla2x00_execute_fw()
716 mcp->mb[4] |= in qla2x00_execute_fw()
721 mcp->mb[4] |= NVME_ENABLE_FLAG; in qla2x00_execute_fw()
728 mcp->mb[4] |= BIT_4; in qla2x00_execute_fw()
729 mcp->mb[11] |= nv->min_supported_speed & 0xF; in qla2x00_execute_fw()
737 mcp->mb[11] |= BIT_4; in qla2x00_execute_fw()
741 mcp->mb[4] |= ENABLE_EXTENDED_LOGIN; in qla2x00_execute_fw()
744 mcp->mb[4] |= ENABLE_EXCHANGE_OFFLD; in qla2x00_execute_fw()
747 mcp->mb[11] |= EXE_FW_FORCE_SEMAPHORE; in qla2x00_execute_fw()
752 mcp->mb[1] = LSW(risc_addr); in qla2x00_execute_fw()
755 mcp->mb[2] = 0; in qla2x00_execute_fw()
766 mcp->mb[1] == 0x27 && retry) { in qla2x00_execute_fw()
777 "Exe FW retry: mb[0]=%x retry[%d]\n", mcp->mb[0], retry); in qla2x00_execute_fw()
781 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_execute_fw()
789 ha->fw_ability_mask = mcp->mb[3] << 16 | mcp->mb[2]; in qla2x00_execute_fw()
792 ql_dbg(ql_dbg_mbx, vha, 0x1027, "exchanges=%x.\n", mcp->mb[1]); in qla2x00_execute_fw()
794 ha->max_supported_speed = mcp->mb[2] & (BIT_0|BIT_1); in qla2x00_execute_fw()
800 ha->min_supported_speed = mcp->mb[5] & in qla2x00_execute_fw()
812 if (IS_QLA28XX(ha) && (mcp->mb[5] & EDIF_HW_SUPPORT)) { in qla2x00_execute_fw()
852 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla_get_exlogin_status()
853 mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; in qla_get_exlogin_status()
854 mcp->mb[1] = FETCH_XLOGINS_STAT; in qla_get_exlogin_status()
864 *buf_sz = mcp->mb[4]; in qla_get_exlogin_status()
865 *ex_logins_cnt = mcp->mb[10]; in qla_get_exlogin_status()
869 mcp->mb[4], mcp->mb[10]); in qla_get_exlogin_status()
909 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla_set_exlogin_mem_cfg()
910 mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; in qla_set_exlogin_mem_cfg()
911 mcp->mb[1] = CONFIG_XLOGINS_MEM; in qla_set_exlogin_mem_cfg()
912 mcp->mb[2] = MSW(phys_addr); in qla_set_exlogin_mem_cfg()
913 mcp->mb[3] = LSW(phys_addr); in qla_set_exlogin_mem_cfg()
914 mcp->mb[6] = MSW(MSD(phys_addr)); in qla_set_exlogin_mem_cfg()
915 mcp->mb[7] = LSW(MSD(phys_addr)); in qla_set_exlogin_mem_cfg()
916 mcp->mb[8] = MSW(ha->exlogin_size); in qla_set_exlogin_mem_cfg()
917 mcp->mb[9] = LSW(ha->exlogin_size); in qla_set_exlogin_mem_cfg()
926 rval, mcp->mb[0], mcp->mb[11]); in qla_set_exlogin_mem_cfg()
962 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla_get_exchoffld_status()
963 mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; in qla_get_exchoffld_status()
964 mcp->mb[1] = FETCH_XCHOFFLD_STAT; in qla_get_exchoffld_status()
974 *buf_sz = mcp->mb[4]; in qla_get_exchoffld_status()
975 *ex_logins_cnt = mcp->mb[10]; in qla_get_exchoffld_status()
979 mcp->mb[4], mcp->mb[10]); in qla_get_exchoffld_status()
1019 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla_set_exchoffld_mem_cfg()
1020 mcp->mb[0] = MBC_GET_MEM_OFFLOAD_CNTRL_STAT; in qla_set_exchoffld_mem_cfg()
1021 mcp->mb[1] = CONFIG_XCHOFFLD_MEM; in qla_set_exchoffld_mem_cfg()
1022 mcp->mb[2] = MSW(ha->exchoffld_buf_dma); in qla_set_exchoffld_mem_cfg()
1023 mcp->mb[3] = LSW(ha->exchoffld_buf_dma); in qla_set_exchoffld_mem_cfg()
1024 mcp->mb[6] = MSW(MSD(ha->exchoffld_buf_dma)); in qla_set_exchoffld_mem_cfg()
1025 mcp->mb[7] = LSW(MSD(ha->exchoffld_buf_dma)); in qla_set_exchoffld_mem_cfg()
1026 mcp->mb[8] = MSW(ha->exchoffld_size); in qla_set_exchoffld_mem_cfg()
1027 mcp->mb[9] = LSW(ha->exchoffld_size); in qla_set_exchoffld_mem_cfg()
1071 mcp->mb[0] = MBC_GET_FIRMWARE_VERSION; in qla2x00_get_fw_version()
1090 ha->fw_major_version = mcp->mb[1]; in qla2x00_get_fw_version()
1091 ha->fw_minor_version = mcp->mb[2]; in qla2x00_get_fw_version()
1092 ha->fw_subminor_version = mcp->mb[3]; in qla2x00_get_fw_version()
1093 ha->fw_attributes = mcp->mb[6]; in qla2x00_get_fw_version()
1097 ha->fw_memory_size = (mcp->mb[5] << 16) | mcp->mb[4]; in qla2x00_get_fw_version()
1100 ha->mpi_version[0] = mcp->mb[10] & 0xff; in qla2x00_get_fw_version()
1101 ha->mpi_version[1] = mcp->mb[11] >> 8; in qla2x00_get_fw_version()
1102 ha->mpi_version[2] = mcp->mb[11] & 0xff; in qla2x00_get_fw_version()
1103 ha->mpi_capabilities = (mcp->mb[12] << 16) | mcp->mb[13]; in qla2x00_get_fw_version()
1104 ha->phy_version[0] = mcp->mb[8] & 0xff; in qla2x00_get_fw_version()
1105 ha->phy_version[1] = mcp->mb[9] >> 8; in qla2x00_get_fw_version()
1106 ha->phy_version[2] = mcp->mb[9] & 0xff; in qla2x00_get_fw_version()
1110 ha->fw_attributes_h = mcp->mb[15]; in qla2x00_get_fw_version()
1111 ha->fw_attributes_ext[0] = mcp->mb[16]; in qla2x00_get_fw_version()
1112 ha->fw_attributes_ext[1] = mcp->mb[17]; in qla2x00_get_fw_version()
1115 __func__, mcp->mb[15], mcp->mb[6]); in qla2x00_get_fw_version()
1118 __func__, mcp->mb[17], mcp->mb[16]); in qla2x00_get_fw_version()
1163 ha->serdes_version[0] = mcp->mb[7] & 0xff; in qla2x00_get_fw_version()
1164 ha->serdes_version[1] = mcp->mb[8] >> 8; in qla2x00_get_fw_version()
1165 ha->serdes_version[2] = mcp->mb[8] & 0xff; in qla2x00_get_fw_version()
1166 ha->mpi_version[0] = mcp->mb[10] & 0xff; in qla2x00_get_fw_version()
1167 ha->mpi_version[1] = mcp->mb[11] >> 8; in qla2x00_get_fw_version()
1168 ha->mpi_version[2] = mcp->mb[11] & 0xff; in qla2x00_get_fw_version()
1169 ha->pep_version[0] = mcp->mb[13] & 0xff; in qla2x00_get_fw_version()
1170 ha->pep_version[1] = mcp->mb[14] >> 8; in qla2x00_get_fw_version()
1171 ha->pep_version[2] = mcp->mb[14] & 0xff; in qla2x00_get_fw_version()
1172 ha->fw_shared_ram_start = (mcp->mb[19] << 16) | mcp->mb[18]; in qla2x00_get_fw_version()
1173 ha->fw_shared_ram_end = (mcp->mb[21] << 16) | mcp->mb[20]; in qla2x00_get_fw_version()
1174 ha->fw_ddr_ram_start = (mcp->mb[23] << 16) | mcp->mb[22]; in qla2x00_get_fw_version()
1175 ha->fw_ddr_ram_end = (mcp->mb[25] << 16) | mcp->mb[24]; in qla2x00_get_fw_version()
1177 if (mcp->mb[16] & BIT_10) in qla2x00_get_fw_version()
1239 mcp->mb[0] = MBC_GET_FIRMWARE_OPTION; in qla2x00_get_fw_options()
1250 fwopts[0] = mcp->mb[0]; in qla2x00_get_fw_options()
1251 fwopts[1] = mcp->mb[1]; in qla2x00_get_fw_options()
1252 fwopts[2] = mcp->mb[2]; in qla2x00_get_fw_options()
1253 fwopts[3] = mcp->mb[3]; in qla2x00_get_fw_options()
1287 mcp->mb[0] = MBC_SET_FIRMWARE_OPTION; in qla2x00_set_fw_options()
1288 mcp->mb[1] = fwopts[1]; in qla2x00_set_fw_options()
1289 mcp->mb[2] = fwopts[2]; in qla2x00_set_fw_options()
1290 mcp->mb[3] = fwopts[3]; in qla2x00_set_fw_options()
1295 mcp->mb[10] = fwopts[10]; in qla2x00_set_fw_options()
1298 mcp->mb[10] = fwopts[10]; in qla2x00_set_fw_options()
1299 mcp->mb[11] = fwopts[11]; in qla2x00_set_fw_options()
1300 mcp->mb[12] = 0; /* Undocumented, but used */ in qla2x00_set_fw_options()
1307 fwopts[0] = mcp->mb[0]; in qla2x00_set_fw_options()
1312 "Failed=%x (%x/%x).\n", rval, mcp->mb[0], mcp->mb[1]); in qla2x00_set_fw_options()
1347 mcp->mb[0] = MBC_MAILBOX_REGISTER_TEST; in qla2x00_mbx_reg_test()
1348 mcp->mb[1] = 0xAAAA; in qla2x00_mbx_reg_test()
1349 mcp->mb[2] = 0x5555; in qla2x00_mbx_reg_test()
1350 mcp->mb[3] = 0xAA55; in qla2x00_mbx_reg_test()
1351 mcp->mb[4] = 0x55AA; in qla2x00_mbx_reg_test()
1352 mcp->mb[5] = 0xA5A5; in qla2x00_mbx_reg_test()
1353 mcp->mb[6] = 0x5A5A; in qla2x00_mbx_reg_test()
1354 mcp->mb[7] = 0x2525; in qla2x00_mbx_reg_test()
1362 if (mcp->mb[1] != 0xAAAA || mcp->mb[2] != 0x5555 || in qla2x00_mbx_reg_test()
1363 mcp->mb[3] != 0xAA55 || mcp->mb[4] != 0x55AA) in qla2x00_mbx_reg_test()
1365 if (mcp->mb[5] != 0xA5A5 || mcp->mb[6] != 0x5A5A || in qla2x00_mbx_reg_test()
1366 mcp->mb[7] != 0x2525) in qla2x00_mbx_reg_test()
1408 mcp->mb[0] = MBC_VERIFY_CHECKSUM; in qla2x00_verify_checksum()
1412 mcp->mb[1] = MSW(risc_addr); in qla2x00_verify_checksum()
1413 mcp->mb[2] = LSW(risc_addr); in qla2x00_verify_checksum()
1417 mcp->mb[1] = LSW(risc_addr); in qla2x00_verify_checksum()
1429 (mcp->mb[2] << 16) | mcp->mb[1] : mcp->mb[1]); in qla2x00_verify_checksum()
1470 mcp->mb[0] = MBC_IOCB_COMMAND_A64; in qla2x00_issue_iocb_timeout()
1471 mcp->mb[1] = 0; in qla2x00_issue_iocb_timeout()
1472 mcp->mb[2] = MSW(LSD(phys_addr)); in qla2x00_issue_iocb_timeout()
1473 mcp->mb[3] = LSW(LSD(phys_addr)); in qla2x00_issue_iocb_timeout()
1474 mcp->mb[6] = MSW(MSD(phys_addr)); in qla2x00_issue_iocb_timeout()
1475 mcp->mb[7] = LSW(MSD(phys_addr)); in qla2x00_issue_iocb_timeout()
1555 mcp->mb[0] = MBC_ABORT_COMMAND; in qla2x00_abort_command()
1557 mcp->mb[1] = fcport->loop_id; in qla2x00_abort_command()
1559 mcp->mb[1] = fcport->loop_id << 8; in qla2x00_abort_command()
1560 mcp->mb[2] = (uint16_t)handle; in qla2x00_abort_command()
1561 mcp->mb[3] = (uint16_t)(handle >> 16); in qla2x00_abort_command()
1562 mcp->mb[6] = (uint16_t)cmd->device->lun; in qla2x00_abort_command()
1592 mcp->mb[0] = MBC_ABORT_TARGET; in qla2x00_abort_target()
1595 mcp->mb[1] = fcport->loop_id; in qla2x00_abort_target()
1596 mcp->mb[10] = 0; in qla2x00_abort_target()
1599 mcp->mb[1] = fcport->loop_id << 8; in qla2x00_abort_target()
1601 mcp->mb[2] = vha->hw->loop_reset_delay; in qla2x00_abort_target()
1602 mcp->mb[9] = vha->vp_idx; in qla2x00_abort_target()
1640 mcp->mb[0] = MBC_LUN_RESET; in qla2x00_lun_reset()
1643 mcp->mb[1] = fcport->loop_id; in qla2x00_lun_reset()
1645 mcp->mb[1] = fcport->loop_id << 8; in qla2x00_lun_reset()
1646 mcp->mb[2] = (u32)l; in qla2x00_lun_reset()
1647 mcp->mb[3] = 0; in qla2x00_lun_reset()
1648 mcp->mb[9] = vha->vp_idx; in qla2x00_lun_reset()
1703 mcp->mb[0] = MBC_GET_ADAPTER_LOOP_ID; in qla2x00_get_adapter_id()
1704 mcp->mb[9] = vha->vp_idx; in qla2x00_get_adapter_id()
1717 if (mcp->mb[0] == MBS_COMMAND_ERROR) in qla2x00_get_adapter_id()
1719 else if (mcp->mb[0] == MBS_INVALID_COMMAND) in qla2x00_get_adapter_id()
1723 *id = mcp->mb[1]; in qla2x00_get_adapter_id()
1724 *al_pa = LSB(mcp->mb[2]); in qla2x00_get_adapter_id()
1725 *area = MSB(mcp->mb[2]); in qla2x00_get_adapter_id()
1726 *domain = LSB(mcp->mb[3]); in qla2x00_get_adapter_id()
1727 *top = mcp->mb[6]; in qla2x00_get_adapter_id()
1728 *sw_cap = mcp->mb[7]; in qla2x00_get_adapter_id()
1738 vha->fcoe_vlan_id = mcp->mb[9] & 0xfff; in qla2x00_get_adapter_id()
1739 vha->fcoe_fcf_idx = mcp->mb[10]; in qla2x00_get_adapter_id()
1740 vha->fcoe_vn_port_mac[5] = mcp->mb[11] >> 8; in qla2x00_get_adapter_id()
1741 vha->fcoe_vn_port_mac[4] = mcp->mb[11] & 0xff; in qla2x00_get_adapter_id()
1742 vha->fcoe_vn_port_mac[3] = mcp->mb[12] >> 8; in qla2x00_get_adapter_id()
1743 vha->fcoe_vn_port_mac[2] = mcp->mb[12] & 0xff; in qla2x00_get_adapter_id()
1744 vha->fcoe_vn_port_mac[1] = mcp->mb[13] >> 8; in qla2x00_get_adapter_id()
1745 vha->fcoe_vn_port_mac[0] = mcp->mb[13] & 0xff; in qla2x00_get_adapter_id()
1749 if (mcp->mb[7] & BIT_14) { in qla2x00_get_adapter_id()
1750 vha->port_name[0] = MSB(mcp->mb[16]); in qla2x00_get_adapter_id()
1751 vha->port_name[1] = LSB(mcp->mb[16]); in qla2x00_get_adapter_id()
1752 vha->port_name[2] = MSB(mcp->mb[17]); in qla2x00_get_adapter_id()
1753 vha->port_name[3] = LSB(mcp->mb[17]); in qla2x00_get_adapter_id()
1754 vha->port_name[4] = MSB(mcp->mb[18]); in qla2x00_get_adapter_id()
1755 vha->port_name[5] = LSB(mcp->mb[18]); in qla2x00_get_adapter_id()
1756 vha->port_name[6] = MSB(mcp->mb[19]); in qla2x00_get_adapter_id()
1757 vha->port_name[7] = LSB(mcp->mb[19]); in qla2x00_get_adapter_id()
1767 vha->bbcr = mcp->mb[15]; in qla2x00_get_adapter_id()
1768 if (mcp->mb[7] & SCM_EDC_ACC_RECEIVED) { in qla2x00_get_adapter_id()
1771 mcp->mb[21]); in qla2x00_get_adapter_id()
1773 if (mcp->mb[7] & SCM_RDF_ACC_RECEIVED) { in qla2x00_get_adapter_id()
1779 mcp->mb[23]); in qla2x00_get_adapter_id()
1814 mcp->mb[0] = MBC_GET_RETRY_COUNT; in qla2x00_get_retry_cnt()
1824 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_retry_cnt()
1827 *r_a_tov = mcp->mb[3] / 2; in qla2x00_get_retry_cnt()
1828 ratov = (mcp->mb[3]/2) / 10; /* mb[3] value is in 100ms */ in qla2x00_get_retry_cnt()
1829 if (mcp->mb[1] * ratov > (*retry_cnt) * (*tov)) { in qla2x00_get_retry_cnt()
1831 *retry_cnt = (uint8_t)mcp->mb[1]; in qla2x00_get_retry_cnt()
1836 "Done %s mb3=%d ratov=%d.\n", __func__, mcp->mb[3], ratov); in qla2x00_get_retry_cnt()
1875 mcp->mb[0] = MBC_MID_INITIALIZE_FIRMWARE; in qla2x00_init_firmware()
1877 mcp->mb[0] = MBC_INITIALIZE_FIRMWARE; in qla2x00_init_firmware()
1879 mcp->mb[1] = 0; in qla2x00_init_firmware()
1880 mcp->mb[2] = MSW(ha->init_cb_dma); in qla2x00_init_firmware()
1881 mcp->mb[3] = LSW(ha->init_cb_dma); in qla2x00_init_firmware()
1882 mcp->mb[6] = MSW(MSD(ha->init_cb_dma)); in qla2x00_init_firmware()
1883 mcp->mb[7] = LSW(MSD(ha->init_cb_dma)); in qla2x00_init_firmware()
1886 mcp->mb[1] = BIT_0; in qla2x00_init_firmware()
1887 mcp->mb[10] = MSW(ha->ex_init_cb_dma); in qla2x00_init_firmware()
1888 mcp->mb[11] = LSW(ha->ex_init_cb_dma); in qla2x00_init_firmware()
1889 mcp->mb[12] = MSW(MSD(ha->ex_init_cb_dma)); in qla2x00_init_firmware()
1890 mcp->mb[13] = LSW(MSD(ha->ex_init_cb_dma)); in qla2x00_init_firmware()
1891 mcp->mb[14] = sizeof(*ha->ex_init_cb); in qla2x00_init_firmware()
1896 mcp->mb[1] |= BIT_1; in qla2x00_init_firmware()
1897 mcp->mb[16] = MSW(ha->sf_init_cb_dma); in qla2x00_init_firmware()
1898 mcp->mb[17] = LSW(ha->sf_init_cb_dma); in qla2x00_init_firmware()
1899 mcp->mb[18] = MSW(MSD(ha->sf_init_cb_dma)); in qla2x00_init_firmware()
1900 mcp->mb[19] = LSW(MSD(ha->sf_init_cb_dma)); in qla2x00_init_firmware()
1901 mcp->mb[15] = sizeof(*ha->sf_init_cb); in qla2x00_init_firmware()
1918 "Failed=%x mb[0]=%x, mb[1]=%x, mb[2]=%x, mb[3]=%x.\n", in qla2x00_init_firmware()
1919 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3]); in qla2x00_init_firmware()
1932 if (mcp->mb[2] == 6 || mcp->mb[3] == 2) in qla2x00_init_firmware()
1983 mcp->mb[0] = MBC_GET_PORT_DATABASE; in qla2x00_get_port_database()
1985 mcp->mb[0] = MBC_ENHANCED_GET_PORT_DATABASE; in qla2x00_get_port_database()
1986 mcp->mb[2] = MSW(pd_dma); in qla2x00_get_port_database()
1987 mcp->mb[3] = LSW(pd_dma); in qla2x00_get_port_database()
1988 mcp->mb[6] = MSW(MSD(pd_dma)); in qla2x00_get_port_database()
1989 mcp->mb[7] = LSW(MSD(pd_dma)); in qla2x00_get_port_database()
1990 mcp->mb[9] = vha->vp_idx; in qla2x00_get_port_database()
1994 mcp->mb[1] = fcport->loop_id; in qla2x00_get_port_database()
1995 mcp->mb[10] = opt; in qla2x00_get_port_database()
1999 mcp->mb[1] = fcport->loop_id; in qla2x00_get_port_database()
2000 mcp->mb[10] = opt; in qla2x00_get_port_database()
2003 mcp->mb[1] = fcport->loop_id << 8 | opt; in qla2x00_get_port_database()
2124 "Failed=%x mb[0]=%x mb[1]=%x.\n", rval, in qla2x00_get_port_database()
2125 mcp->mb[0], mcp->mb[1]); in qla2x00_get_port_database()
2155 mcp->mb[0] = MBC_GET_PORT_DATABASE; in qla24xx_get_port_database()
2156 mcp->mb[1] = nport_handle; in qla24xx_get_port_database()
2157 mcp->mb[2] = MSW(LSD(pdb_dma)); in qla24xx_get_port_database()
2158 mcp->mb[3] = LSW(LSD(pdb_dma)); in qla24xx_get_port_database()
2159 mcp->mb[6] = MSW(MSD(pdb_dma)); in qla24xx_get_port_database()
2160 mcp->mb[7] = LSW(MSD(pdb_dma)); in qla24xx_get_port_database()
2161 mcp->mb[9] = 0; in qla24xx_get_port_database()
2162 mcp->mb[10] = 0; in qla24xx_get_port_database()
2172 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla24xx_get_port_database()
2173 rval, mcp->mb[0], mcp->mb[1]); in qla24xx_get_port_database()
2215 mcp->mb[0] = MBC_GET_FIRMWARE_STATE; in qla2x00_get_firmware_state()
2226 states[0] = mcp->mb[1]; in qla2x00_get_firmware_state()
2228 states[1] = mcp->mb[2]; in qla2x00_get_firmware_state()
2229 states[2] = mcp->mb[3]; /* SFP info */ in qla2x00_get_firmware_state()
2230 states[3] = mcp->mb[4]; in qla2x00_get_firmware_state()
2231 states[4] = mcp->mb[5]; in qla2x00_get_firmware_state()
2232 states[5] = mcp->mb[6]; /* DPORT status */ in qla2x00_get_firmware_state()
2240 if (mcp->mb[2] == 6 || mcp->mb[3] == 2) in qla2x00_get_firmware_state()
2280 mcp->mb[0] = MBC_GET_PORT_NAME; in qla2x00_get_port_name()
2281 mcp->mb[9] = vha->vp_idx; in qla2x00_get_port_name()
2284 mcp->mb[1] = loop_id; in qla2x00_get_port_name()
2285 mcp->mb[10] = opt; in qla2x00_get_port_name()
2288 mcp->mb[1] = loop_id << 8 | opt; in qla2x00_get_port_name()
2302 name[0] = MSB(mcp->mb[2]); in qla2x00_get_port_name()
2303 name[1] = LSB(mcp->mb[2]); in qla2x00_get_port_name()
2304 name[2] = MSB(mcp->mb[3]); in qla2x00_get_port_name()
2305 name[3] = LSB(mcp->mb[3]); in qla2x00_get_port_name()
2306 name[4] = MSB(mcp->mb[6]); in qla2x00_get_port_name()
2307 name[5] = LSB(mcp->mb[6]); in qla2x00_get_port_name()
2308 name[6] = MSB(mcp->mb[7]); in qla2x00_get_port_name()
2309 name[7] = LSB(mcp->mb[7]); in qla2x00_get_port_name()
2347 mcp->mb[0] = MBC_LINK_INITIALIZATION; in qla24xx_link_initialize()
2348 mcp->mb[1] = BIT_4; in qla24xx_link_initialize()
2350 mcp->mb[1] |= BIT_6; in qla24xx_link_initialize()
2352 mcp->mb[1] |= BIT_5; in qla24xx_link_initialize()
2353 mcp->mb[2] = 0; in qla24xx_link_initialize()
2354 mcp->mb[3] = 0; in qla24xx_link_initialize()
2398 mcp->mb[0] = MBC_LIP_FULL_LOGIN; in qla2x00_lip_reset()
2399 mcp->mb[1] = BIT_1; in qla2x00_lip_reset()
2400 mcp->mb[2] = 0; in qla2x00_lip_reset()
2403 mcp->mb[0] = MBC_LIP_FULL_LOGIN; in qla2x00_lip_reset()
2404 mcp->mb[1] = BIT_4; in qla2x00_lip_reset()
2405 mcp->mb[2] = 0; in qla2x00_lip_reset()
2406 mcp->mb[3] = vha->hw->loop_reset_delay; in qla2x00_lip_reset()
2409 mcp->mb[0] = MBC_LIP_RESET; in qla2x00_lip_reset()
2412 mcp->mb[1] = 0x00ff; in qla2x00_lip_reset()
2413 mcp->mb[10] = 0; in qla2x00_lip_reset()
2416 mcp->mb[1] = 0xff00; in qla2x00_lip_reset()
2418 mcp->mb[2] = vha->hw->loop_reset_delay; in qla2x00_lip_reset()
2419 mcp->mb[3] = 0; in qla2x00_lip_reset()
2471 mcp->mb[0] = MBC_SEND_SNS_COMMAND; in qla2x00_send_sns()
2472 mcp->mb[1] = cmd_size; in qla2x00_send_sns()
2473 mcp->mb[2] = MSW(sns_phys_address); in qla2x00_send_sns()
2474 mcp->mb[3] = LSW(sns_phys_address); in qla2x00_send_sns()
2475 mcp->mb[6] = MSW(MSD(sns_phys_address)); in qla2x00_send_sns()
2476 mcp->mb[7] = LSW(MSD(sns_phys_address)); in qla2x00_send_sns()
2487 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_send_sns()
2488 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_send_sns()
2500 uint8_t area, uint8_t al_pa, uint16_t *mb, uint8_t opt) in qla24xx_login_fabric() argument
2559 mb[0] = MBS_PORT_ID_USED; in qla24xx_login_fabric()
2560 mb[1] = LSW(iop[1]); in qla24xx_login_fabric()
2563 mb[0] = MBS_LOOP_ID_USED; in qla24xx_login_fabric()
2579 mb[0] = MBS_COMMAND_ERROR; in qla24xx_login_fabric()
2588 mb[0] = MBS_COMMAND_COMPLETE; in qla24xx_login_fabric()
2589 mb[1] = 0; in qla24xx_login_fabric()
2592 mb[1] |= BIT_1; in qla24xx_login_fabric()
2594 mb[1] = BIT_0; in qla24xx_login_fabric()
2597 mb[10] = 0; in qla24xx_login_fabric()
2599 mb[10] |= BIT_0; /* Class 2. */ in qla24xx_login_fabric()
2601 mb[10] |= BIT_1; /* Class 3. */ in qla24xx_login_fabric()
2603 mb[10] |= BIT_7; /* Confirmed Completion in qla24xx_login_fabric()
2636 uint8_t area, uint8_t al_pa, uint16_t *mb, uint8_t opt) in qla2x00_login_fabric() argument
2646 mcp->mb[0] = MBC_LOGIN_FABRIC_PORT; in qla2x00_login_fabric()
2649 mcp->mb[1] = loop_id; in qla2x00_login_fabric()
2650 mcp->mb[10] = opt; in qla2x00_login_fabric()
2653 mcp->mb[1] = (loop_id << 8) | opt; in qla2x00_login_fabric()
2655 mcp->mb[2] = domain; in qla2x00_login_fabric()
2656 mcp->mb[3] = area << 8 | al_pa; in qla2x00_login_fabric()
2664 if (mb != NULL) { in qla2x00_login_fabric()
2665 mb[0] = mcp->mb[0]; in qla2x00_login_fabric()
2666 mb[1] = mcp->mb[1]; in qla2x00_login_fabric()
2667 mb[2] = mcp->mb[2]; in qla2x00_login_fabric()
2668 mb[6] = mcp->mb[6]; in qla2x00_login_fabric()
2669 mb[7] = mcp->mb[7]; in qla2x00_login_fabric()
2671 mb[10] = 0; in qla2x00_login_fabric()
2681 if (mcp->mb[0] == 0x4001 || mcp->mb[0] == 0x4002 || in qla2x00_login_fabric()
2682 mcp->mb[0] == 0x4003 || mcp->mb[0] == 0x4005 || in qla2x00_login_fabric()
2683 mcp->mb[0] == 0x4006) in qla2x00_login_fabric()
2688 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla2x00_login_fabric()
2689 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_login_fabric()
2732 mcp->mb[0] = MBC_LOGIN_LOOP_PORT; in qla2x00_login_local_device()
2734 mcp->mb[1] = fcport->loop_id; in qla2x00_login_local_device()
2736 mcp->mb[1] = fcport->loop_id << 8; in qla2x00_login_local_device()
2737 mcp->mb[2] = opt; in qla2x00_login_local_device()
2746 mb_ret[0] = mcp->mb[0]; in qla2x00_login_local_device()
2747 mb_ret[1] = mcp->mb[1]; in qla2x00_login_local_device()
2748 mb_ret[6] = mcp->mb[6]; in qla2x00_login_local_device()
2749 mb_ret[7] = mcp->mb[7]; in qla2x00_login_local_device()
2759 if (mcp->mb[0] == 0x4005 || mcp->mb[0] == 0x4006) in qla2x00_login_local_device()
2763 "Failed=%x mb[0]=%x mb[1]=%x mb[6]=%x mb[7]=%x.\n", in qla2x00_login_local_device()
2764 rval, mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7]); in qla2x00_login_local_device()
2860 mcp->mb[0] = MBC_LOGOUT_FABRIC_PORT; in qla2x00_fabric_logout()
2863 mcp->mb[1] = loop_id; in qla2x00_fabric_logout()
2864 mcp->mb[10] = 0; in qla2x00_fabric_logout()
2867 mcp->mb[1] = loop_id << 8; in qla2x00_fabric_logout()
2878 "Failed=%x mb[1]=%x.\n", rval, mcp->mb[1]); in qla2x00_fabric_logout()
2913 mcp->mb[0] = MBC_LIP_FULL_LOGIN; in qla2x00_full_login_lip()
2914 mcp->mb[1] = IS_FWI2_CAPABLE(vha->hw) ? BIT_4 : 0; in qla2x00_full_login_lip()
2915 mcp->mb[2] = 0; in qla2x00_full_login_lip()
2916 mcp->mb[3] = 0; in qla2x00_full_login_lip()
2961 mcp->mb[0] = MBC_GET_ID_LIST; in qla2x00_get_id_list()
2964 mcp->mb[2] = MSW(id_list_dma); in qla2x00_get_id_list()
2965 mcp->mb[3] = LSW(id_list_dma); in qla2x00_get_id_list()
2966 mcp->mb[6] = MSW(MSD(id_list_dma)); in qla2x00_get_id_list()
2967 mcp->mb[7] = LSW(MSD(id_list_dma)); in qla2x00_get_id_list()
2968 mcp->mb[8] = 0; in qla2x00_get_id_list()
2969 mcp->mb[9] = vha->vp_idx; in qla2x00_get_id_list()
2972 mcp->mb[1] = MSW(id_list_dma); in qla2x00_get_id_list()
2973 mcp->mb[2] = LSW(id_list_dma); in qla2x00_get_id_list()
2974 mcp->mb[3] = MSW(MSD(id_list_dma)); in qla2x00_get_id_list()
2975 mcp->mb[6] = LSW(MSD(id_list_dma)); in qla2x00_get_id_list()
2987 *entries = mcp->mb[1]; in qla2x00_get_id_list()
3019 mcp->mb[0] = MBC_GET_RESOURCE_COUNTS; in qla2x00_get_resource_cnts()
3032 "Failed mb[0]=%x.\n", mcp->mb[0]); in qla2x00_get_resource_cnts()
3036 "mb11=%x mb12=%x.\n", __func__, mcp->mb[1], mcp->mb[2], in qla2x00_get_resource_cnts()
3037 mcp->mb[3], mcp->mb[6], mcp->mb[7], mcp->mb[10], in qla2x00_get_resource_cnts()
3038 mcp->mb[11], mcp->mb[12]); in qla2x00_get_resource_cnts()
3040 ha->orig_fw_tgt_xcb_count = mcp->mb[1]; in qla2x00_get_resource_cnts()
3041 ha->cur_fw_tgt_xcb_count = mcp->mb[2]; in qla2x00_get_resource_cnts()
3042 ha->cur_fw_xcb_count = mcp->mb[3]; in qla2x00_get_resource_cnts()
3043 ha->orig_fw_xcb_count = mcp->mb[6]; in qla2x00_get_resource_cnts()
3044 ha->cur_fw_iocb_count = mcp->mb[7]; in qla2x00_get_resource_cnts()
3045 ha->orig_fw_iocb_count = mcp->mb[10]; in qla2x00_get_resource_cnts()
3047 ha->max_npiv_vports = mcp->mb[11]; in qla2x00_get_resource_cnts()
3049 ha->fw_max_fcf_count = mcp->mb[12]; in qla2x00_get_resource_cnts()
3090 mcp->mb[0] = MBC_GET_FC_AL_POSITION_MAP; in qla2x00_get_fcal_position_map()
3091 mcp->mb[2] = MSW(pmap_dma); in qla2x00_get_fcal_position_map()
3092 mcp->mb[3] = LSW(pmap_dma); in qla2x00_get_fcal_position_map()
3093 mcp->mb[6] = MSW(MSD(pmap_dma)); in qla2x00_get_fcal_position_map()
3094 mcp->mb[7] = LSW(MSD(pmap_dma)); in qla2x00_get_fcal_position_map()
3105 mcp->mb[0], mcp->mb[1], (unsigned)pmap[0]); in qla2x00_get_fcal_position_map()
3153 mcp->mb[0] = MBC_GET_LINK_STATUS; in qla2x00_get_link_status()
3154 mcp->mb[2] = MSW(LSD(stats_dma)); in qla2x00_get_link_status()
3155 mcp->mb[3] = LSW(LSD(stats_dma)); in qla2x00_get_link_status()
3156 mcp->mb[6] = MSW(MSD(stats_dma)); in qla2x00_get_link_status()
3157 mcp->mb[7] = LSW(MSD(stats_dma)); in qla2x00_get_link_status()
3161 mcp->mb[1] = loop_id; in qla2x00_get_link_status()
3162 mcp->mb[4] = 0; in qla2x00_get_link_status()
3163 mcp->mb[10] = 0; in qla2x00_get_link_status()
3167 mcp->mb[1] = loop_id; in qla2x00_get_link_status()
3168 mcp->mb[10] = 0; in qla2x00_get_link_status()
3171 mcp->mb[1] = loop_id << 8; in qla2x00_get_link_status()
3179 if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { in qla2x00_get_link_status()
3181 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_link_status()
3212 mc.mb[0] = MBC_GET_LINK_PRIV_STATS; in qla24xx_get_isp_stats()
3213 mc.mb[2] = MSW(LSD(stats_dma)); in qla24xx_get_isp_stats()
3214 mc.mb[3] = LSW(LSD(stats_dma)); in qla24xx_get_isp_stats()
3215 mc.mb[6] = MSW(MSD(stats_dma)); in qla24xx_get_isp_stats()
3216 mc.mb[7] = LSW(MSD(stats_dma)); in qla24xx_get_isp_stats()
3217 mc.mb[8] = dwords; in qla24xx_get_isp_stats()
3218 mc.mb[9] = vha->vp_idx; in qla24xx_get_isp_stats()
3219 mc.mb[10] = options; in qla24xx_get_isp_stats()
3224 if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { in qla24xx_get_isp_stats()
3226 "Failed mb[0]=%x.\n", mcp->mb[0]); in qla24xx_get_isp_stats()
3470 mcp->mb[0] = MBC_GEN_SYSTEM_ERROR; in qla2x00_system_error()
3501 mcp->mb[0] = MBC_WRITE_SERDES; in qla2x00_write_serdes_word()
3502 mcp->mb[1] = addr; in qla2x00_write_serdes_word()
3504 mcp->mb[2] = data & 0xff; in qla2x00_write_serdes_word()
3506 mcp->mb[2] = data; in qla2x00_write_serdes_word()
3508 mcp->mb[3] = 0; in qla2x00_write_serdes_word()
3517 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_write_serdes_word()
3540 mcp->mb[0] = MBC_READ_SERDES; in qla2x00_read_serdes_word()
3541 mcp->mb[1] = addr; in qla2x00_read_serdes_word()
3542 mcp->mb[3] = 0; in qla2x00_read_serdes_word()
3550 *data = mcp->mb[1] & 0xff; in qla2x00_read_serdes_word()
3552 *data = mcp->mb[1]; in qla2x00_read_serdes_word()
3556 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_serdes_word()
3578 mcp->mb[0] = MBC_SET_GET_ETH_SERDES_REG; in qla8044_write_serdes_word()
3579 mcp->mb[1] = HCS_WRITE_SERDES; in qla8044_write_serdes_word()
3580 mcp->mb[3] = LSW(addr); in qla8044_write_serdes_word()
3581 mcp->mb[4] = MSW(addr); in qla8044_write_serdes_word()
3582 mcp->mb[5] = LSW(data); in qla8044_write_serdes_word()
3583 mcp->mb[6] = MSW(data); in qla8044_write_serdes_word()
3592 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla8044_write_serdes_word()
3614 mcp->mb[0] = MBC_SET_GET_ETH_SERDES_REG; in qla8044_read_serdes_word()
3615 mcp->mb[1] = HCS_READ_SERDES; in qla8044_read_serdes_word()
3616 mcp->mb[3] = LSW(addr); in qla8044_read_serdes_word()
3617 mcp->mb[4] = MSW(addr); in qla8044_read_serdes_word()
3624 *data = mcp->mb[2] << 16 | mcp->mb[1]; in qla8044_read_serdes_word()
3628 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla8044_read_serdes_word()
3657 mcp->mb[0] = MBC_SERDES_PARAMS; in qla2x00_set_serdes_params()
3658 mcp->mb[1] = BIT_0; in qla2x00_set_serdes_params()
3659 mcp->mb[2] = sw_em_1g | BIT_15; in qla2x00_set_serdes_params()
3660 mcp->mb[3] = sw_em_2g | BIT_15; in qla2x00_set_serdes_params()
3661 mcp->mb[4] = sw_em_4g | BIT_15; in qla2x00_set_serdes_params()
3671 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_set_serdes_params()
3694 mcp->mb[0] = MBC_STOP_FIRMWARE; in qla2x00_stop_firmware()
3695 mcp->mb[1] = 0; in qla2x00_stop_firmware()
3704 if (mcp->mb[0] == MBS_INVALID_COMMAND) in qla2x00_stop_firmware()
3731 mcp->mb[0] = MBC_TRACE_CONTROL; in qla2x00_enable_eft_trace()
3732 mcp->mb[1] = TC_EFT_ENABLE; in qla2x00_enable_eft_trace()
3733 mcp->mb[2] = LSW(eft_dma); in qla2x00_enable_eft_trace()
3734 mcp->mb[3] = MSW(eft_dma); in qla2x00_enable_eft_trace()
3735 mcp->mb[4] = LSW(MSD(eft_dma)); in qla2x00_enable_eft_trace()
3736 mcp->mb[5] = MSW(MSD(eft_dma)); in qla2x00_enable_eft_trace()
3737 mcp->mb[6] = buffers; in qla2x00_enable_eft_trace()
3738 mcp->mb[7] = TC_AEN_DISABLE; in qla2x00_enable_eft_trace()
3746 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_enable_eft_trace()
3747 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_enable_eft_trace()
3772 mcp->mb[0] = MBC_TRACE_CONTROL; in qla2x00_disable_eft_trace()
3773 mcp->mb[1] = TC_EFT_DISABLE; in qla2x00_disable_eft_trace()
3781 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_disable_eft_trace()
3782 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_disable_eft_trace()
3793 uint16_t buffers, uint16_t *mb, uint32_t *dwords) in qla2x00_enable_fce_trace() argument
3810 mcp->mb[0] = MBC_TRACE_CONTROL; in qla2x00_enable_fce_trace()
3811 mcp->mb[1] = TC_FCE_ENABLE; in qla2x00_enable_fce_trace()
3812 mcp->mb[2] = LSW(fce_dma); in qla2x00_enable_fce_trace()
3813 mcp->mb[3] = MSW(fce_dma); in qla2x00_enable_fce_trace()
3814 mcp->mb[4] = LSW(MSD(fce_dma)); in qla2x00_enable_fce_trace()
3815 mcp->mb[5] = MSW(MSD(fce_dma)); in qla2x00_enable_fce_trace()
3816 mcp->mb[6] = buffers; in qla2x00_enable_fce_trace()
3817 mcp->mb[7] = TC_AEN_DISABLE; in qla2x00_enable_fce_trace()
3818 mcp->mb[8] = 0; in qla2x00_enable_fce_trace()
3819 mcp->mb[9] = TC_FCE_DEFAULT_RX_SIZE; in qla2x00_enable_fce_trace()
3820 mcp->mb[10] = TC_FCE_DEFAULT_TX_SIZE; in qla2x00_enable_fce_trace()
3829 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_enable_fce_trace()
3830 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_enable_fce_trace()
3835 if (mb) in qla2x00_enable_fce_trace()
3836 memcpy(mb, mcp->mb, 8 * sizeof(*mb)); in qla2x00_enable_fce_trace()
3860 mcp->mb[0] = MBC_TRACE_CONTROL; in qla2x00_disable_fce_trace()
3861 mcp->mb[1] = TC_FCE_DISABLE; in qla2x00_disable_fce_trace()
3862 mcp->mb[2] = TC_FCE_DISABLE_TRACE; in qla2x00_disable_fce_trace()
3871 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_disable_fce_trace()
3872 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_disable_fce_trace()
3878 *wr = (uint64_t) mcp->mb[5] << 48 | in qla2x00_disable_fce_trace()
3879 (uint64_t) mcp->mb[4] << 32 | in qla2x00_disable_fce_trace()
3880 (uint64_t) mcp->mb[3] << 16 | in qla2x00_disable_fce_trace()
3881 (uint64_t) mcp->mb[2]; in qla2x00_disable_fce_trace()
3883 *rd = (uint64_t) mcp->mb[9] << 48 | in qla2x00_disable_fce_trace()
3884 (uint64_t) mcp->mb[8] << 32 | in qla2x00_disable_fce_trace()
3885 (uint64_t) mcp->mb[7] << 16 | in qla2x00_disable_fce_trace()
3886 (uint64_t) mcp->mb[6]; in qla2x00_disable_fce_trace()
3894 uint16_t *port_speed, uint16_t *mb) in qla2x00_get_idma_speed() argument
3906 mcp->mb[0] = MBC_PORT_PARAMS; in qla2x00_get_idma_speed()
3907 mcp->mb[1] = loop_id; in qla2x00_get_idma_speed()
3908 mcp->mb[2] = mcp->mb[3] = 0; in qla2x00_get_idma_speed()
3909 mcp->mb[9] = vha->vp_idx; in qla2x00_get_idma_speed()
3917 if (mb) { in qla2x00_get_idma_speed()
3918 mb[0] = mcp->mb[0]; in qla2x00_get_idma_speed()
3919 mb[1] = mcp->mb[1]; in qla2x00_get_idma_speed()
3920 mb[3] = mcp->mb[3]; in qla2x00_get_idma_speed()
3929 *port_speed = mcp->mb[3]; in qla2x00_get_idma_speed()
3937 uint16_t port_speed, uint16_t *mb) in qla2x00_set_idma_speed() argument
3949 mcp->mb[0] = MBC_PORT_PARAMS; in qla2x00_set_idma_speed()
3950 mcp->mb[1] = loop_id; in qla2x00_set_idma_speed()
3951 mcp->mb[2] = BIT_0; in qla2x00_set_idma_speed()
3952 mcp->mb[3] = port_speed & 0x3F; in qla2x00_set_idma_speed()
3953 mcp->mb[9] = vha->vp_idx; in qla2x00_set_idma_speed()
3961 if (mb) { in qla2x00_set_idma_speed()
3962 mb[0] = mcp->mb[0]; in qla2x00_set_idma_speed()
3963 mb[1] = mcp->mb[1]; in qla2x00_set_idma_speed()
3964 mb[3] = mcp->mb[3]; in qla2x00_set_idma_speed()
4327 mcp->mb[0] = MBC_SEND_CHANGE_REQUEST; in qla2x00_send_change_request()
4328 mcp->mb[1] = format; in qla2x00_send_change_request()
4329 mcp->mb[9] = vp_idx; in qla2x00_send_change_request()
4337 if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { in qla2x00_send_change_request()
4358 mcp->mb[0] = MBC_DUMP_RISC_RAM_EXTENDED; in qla2x00_dump_ram()
4359 mcp->mb[8] = MSW(addr); in qla2x00_dump_ram()
4360 mcp->mb[10] = 0; in qla2x00_dump_ram()
4363 mcp->mb[0] = MBC_DUMP_RISC_RAM; in qla2x00_dump_ram()
4366 mcp->mb[1] = LSW(addr); in qla2x00_dump_ram()
4367 mcp->mb[2] = MSW(req_dma); in qla2x00_dump_ram()
4368 mcp->mb[3] = LSW(req_dma); in qla2x00_dump_ram()
4369 mcp->mb[6] = MSW(MSD(req_dma)); in qla2x00_dump_ram()
4370 mcp->mb[7] = LSW(MSD(req_dma)); in qla2x00_dump_ram()
4373 mcp->mb[4] = MSW(size); in qla2x00_dump_ram()
4374 mcp->mb[5] = LSW(size); in qla2x00_dump_ram()
4377 mcp->mb[4] = LSW(size); in qla2x00_dump_ram()
4388 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_dump_ram()
4516 mcp->mb[0] = MBC_INITIALIZE_MULTIQ; in qla25xx_init_req_que()
4517 mcp->mb[1] = req->options; in qla25xx_init_req_que()
4518 mcp->mb[2] = MSW(LSD(req->dma)); in qla25xx_init_req_que()
4519 mcp->mb[3] = LSW(LSD(req->dma)); in qla25xx_init_req_que()
4520 mcp->mb[6] = MSW(MSD(req->dma)); in qla25xx_init_req_que()
4521 mcp->mb[7] = LSW(MSD(req->dma)); in qla25xx_init_req_que()
4522 mcp->mb[5] = req->length; in qla25xx_init_req_que()
4524 mcp->mb[10] = req->rsp->id; in qla25xx_init_req_que()
4525 mcp->mb[12] = req->qos; in qla25xx_init_req_que()
4526 mcp->mb[11] = req->vp_idx; in qla25xx_init_req_que()
4527 mcp->mb[13] = req->rid; in qla25xx_init_req_que()
4529 mcp->mb[15] = 0; in qla25xx_init_req_que()
4531 mcp->mb[4] = req->id; in qla25xx_init_req_que()
4533 mcp->mb[8] = 0; in qla25xx_init_req_que()
4535 mcp->mb[9] = *req->out_ptr = 0; in qla25xx_init_req_que()
4562 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla25xx_init_req_que()
4589 mcp->mb[0] = MBC_INITIALIZE_MULTIQ; in qla25xx_init_rsp_que()
4590 mcp->mb[1] = rsp->options; in qla25xx_init_rsp_que()
4591 mcp->mb[2] = MSW(LSD(rsp->dma)); in qla25xx_init_rsp_que()
4592 mcp->mb[3] = LSW(LSD(rsp->dma)); in qla25xx_init_rsp_que()
4593 mcp->mb[6] = MSW(MSD(rsp->dma)); in qla25xx_init_rsp_que()
4594 mcp->mb[7] = LSW(MSD(rsp->dma)); in qla25xx_init_rsp_que()
4595 mcp->mb[5] = rsp->length; in qla25xx_init_rsp_que()
4596 mcp->mb[14] = rsp->msix->entry; in qla25xx_init_rsp_que()
4597 mcp->mb[13] = rsp->rid; in qla25xx_init_rsp_que()
4599 mcp->mb[15] = 0; in qla25xx_init_rsp_que()
4601 mcp->mb[4] = rsp->id; in qla25xx_init_rsp_que()
4603 mcp->mb[8] = *rsp->in_ptr = 0; in qla25xx_init_rsp_que()
4605 mcp->mb[9] = 0; in qla25xx_init_rsp_que()
4634 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla25xx_init_rsp_que()
4644 qla81xx_idc_ack(scsi_qla_host_t *vha, uint16_t *mb) in qla81xx_idc_ack() argument
4653 mcp->mb[0] = MBC_IDC_ACK; in qla81xx_idc_ack()
4654 memcpy(&mcp->mb[1], mb, QLA_IDC_ACK_REGS * sizeof(uint16_t)); in qla81xx_idc_ack()
4663 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_idc_ack()
4686 mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; in qla81xx_fac_get_sector_size()
4687 mcp->mb[1] = FAC_OPT_CMD_GET_SECTOR_SIZE; in qla81xx_fac_get_sector_size()
4696 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla81xx_fac_get_sector_size()
4697 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_fac_get_sector_size()
4701 *sector_size = mcp->mb[1]; in qla81xx_fac_get_sector_size()
4721 mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; in qla81xx_fac_do_write_enable()
4722 mcp->mb[1] = enable ? FAC_OPT_CMD_WRITE_ENABLE : in qla81xx_fac_do_write_enable()
4732 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla81xx_fac_do_write_enable()
4733 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_fac_do_write_enable()
4756 mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; in qla81xx_fac_erase_sector()
4757 mcp->mb[1] = FAC_OPT_CMD_ERASE_SECTOR; in qla81xx_fac_erase_sector()
4758 mcp->mb[2] = LSW(start); in qla81xx_fac_erase_sector()
4759 mcp->mb[3] = MSW(start); in qla81xx_fac_erase_sector()
4760 mcp->mb[4] = LSW(finish); in qla81xx_fac_erase_sector()
4761 mcp->mb[5] = MSW(finish); in qla81xx_fac_erase_sector()
4770 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla81xx_fac_erase_sector()
4771 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla81xx_fac_erase_sector()
4795 mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; in qla81xx_fac_semaphore_access()
4796 mcp->mb[1] = (lock ? FAC_OPT_CMD_LOCK_SEMAPHORE : in qla81xx_fac_semaphore_access()
4806 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla81xx_fac_semaphore_access()
4807 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla81xx_fac_semaphore_access()
4826 mcp->mb[0] = MBC_RESTART_MPI_FW; in qla81xx_restart_mpi_firmware()
4835 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla81xx_restart_mpi_firmware()
4836 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_restart_mpi_firmware()
4865 mcp->mb[0] = MBC_SET_RNID_PARAMS; in qla82xx_set_driver_version()
4866 mcp->mb[1] = RNID_TYPE_SET_VERSION << 8; in qla82xx_set_driver_version()
4869 mcp->mb[i] = le16_to_cpup(str); in qla82xx_set_driver_version()
4873 mcp->mb[i] = 0; in qla82xx_set_driver_version()
4883 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla82xx_set_driver_version()
4926 mcp->mb[0] = MBC_SET_RNID_PARAMS; in qla25xx_set_driver_version()
4927 mcp->mb[1] = RNID_TYPE_SET_VERSION << 8 | dwlen; in qla25xx_set_driver_version()
4928 mcp->mb[2] = MSW(LSD(str_dma)); in qla25xx_set_driver_version()
4929 mcp->mb[3] = LSW(LSD(str_dma)); in qla25xx_set_driver_version()
4930 mcp->mb[6] = MSW(MSD(str_dma)); in qla25xx_set_driver_version()
4931 mcp->mb[7] = LSW(MSD(str_dma)); in qla25xx_set_driver_version()
4940 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla25xx_set_driver_version()
4966 mcp->mb[0] = MBC_GET_RNID_PARAMS; in qla24xx_get_port_login_templ()
4967 mcp->mb[1] = RNID_TYPE_PORT_LOGIN << 8; in qla24xx_get_port_login_templ()
4968 mcp->mb[2] = MSW(buf_dma); in qla24xx_get_port_login_templ()
4969 mcp->mb[3] = LSW(buf_dma); in qla24xx_get_port_login_templ()
4970 mcp->mb[6] = MSW(MSD(buf_dma)); in qla24xx_get_port_login_templ()
4971 mcp->mb[7] = LSW(MSD(buf_dma)); in qla24xx_get_port_login_templ()
4972 mcp->mb[8] = bufsiz/4; in qla24xx_get_port_login_templ()
4981 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla24xx_get_port_login_templ()
5042 mcp->mb[0] = MBC_SET_RNID_PARAMS; in qla25xx_set_els_cmds_supported()
5043 mcp->mb[1] = RNID_TYPE_ELS_CMD << 8; in qla25xx_set_els_cmds_supported()
5044 mcp->mb[2] = MSW(LSD(els_cmd_map_dma)); in qla25xx_set_els_cmds_supported()
5045 mcp->mb[3] = LSW(LSD(els_cmd_map_dma)); in qla25xx_set_els_cmds_supported()
5046 mcp->mb[6] = MSW(MSD(els_cmd_map_dma)); in qla25xx_set_els_cmds_supported()
5047 mcp->mb[7] = LSW(MSD(els_cmd_map_dma)); in qla25xx_set_els_cmds_supported()
5057 "Failed=%x (%x,%x).\n", rval, mcp->mb[0], mcp->mb[1]); in qla25xx_set_els_cmds_supported()
5082 mcp->mb[0] = MBC_GET_RNID_PARAMS; in qla2x00_read_asic_temperature()
5083 mcp->mb[1] = RNID_TYPE_ASIC_TEMP << 8; in qla2x00_read_asic_temperature()
5089 *temp = mcp->mb[1]; in qla2x00_read_asic_temperature()
5093 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla2x00_read_asic_temperature()
5120 mcp->mb[0] = MBC_READ_SFP; in qla2x00_read_sfp()
5121 mcp->mb[1] = dev; in qla2x00_read_sfp()
5122 mcp->mb[2] = MSW(LSD(sfp_dma)); in qla2x00_read_sfp()
5123 mcp->mb[3] = LSW(LSD(sfp_dma)); in qla2x00_read_sfp()
5124 mcp->mb[6] = MSW(MSD(sfp_dma)); in qla2x00_read_sfp()
5125 mcp->mb[7] = LSW(MSD(sfp_dma)); in qla2x00_read_sfp()
5126 mcp->mb[8] = len; in qla2x00_read_sfp()
5127 mcp->mb[9] = off; in qla2x00_read_sfp()
5128 mcp->mb[10] = opt; in qla2x00_read_sfp()
5136 *sfp = mcp->mb[1]; in qla2x00_read_sfp()
5140 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_sfp()
5141 if (mcp->mb[0] == MBS_COMMAND_ERROR && mcp->mb[1] == 0x22) { in qla2x00_read_sfp()
5174 mcp->mb[0] = MBC_WRITE_SFP; in qla2x00_write_sfp()
5175 mcp->mb[1] = dev; in qla2x00_write_sfp()
5176 mcp->mb[2] = MSW(LSD(sfp_dma)); in qla2x00_write_sfp()
5177 mcp->mb[3] = LSW(LSD(sfp_dma)); in qla2x00_write_sfp()
5178 mcp->mb[6] = MSW(MSD(sfp_dma)); in qla2x00_write_sfp()
5179 mcp->mb[7] = LSW(MSD(sfp_dma)); in qla2x00_write_sfp()
5180 mcp->mb[8] = len; in qla2x00_write_sfp()
5181 mcp->mb[9] = off; in qla2x00_write_sfp()
5182 mcp->mb[10] = opt; in qla2x00_write_sfp()
5191 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_write_sfp()
5214 mcp->mb[0] = MBC_GET_XGMAC_STATS; in qla2x00_get_xgmac_stats()
5215 mcp->mb[2] = MSW(stats_dma); in qla2x00_get_xgmac_stats()
5216 mcp->mb[3] = LSW(stats_dma); in qla2x00_get_xgmac_stats()
5217 mcp->mb[6] = MSW(MSD(stats_dma)); in qla2x00_get_xgmac_stats()
5218 mcp->mb[7] = LSW(MSD(stats_dma)); in qla2x00_get_xgmac_stats()
5219 mcp->mb[8] = size_in_bytes >> 2; in qla2x00_get_xgmac_stats()
5228 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla2x00_get_xgmac_stats()
5229 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_get_xgmac_stats()
5235 *actual_size = mcp->mb[2] << 2; in qla2x00_get_xgmac_stats()
5255 mcp->mb[0] = MBC_GET_DCBX_PARAMS; in qla2x00_get_dcbx_params()
5256 mcp->mb[1] = 0; in qla2x00_get_dcbx_params()
5257 mcp->mb[2] = MSW(tlv_dma); in qla2x00_get_dcbx_params()
5258 mcp->mb[3] = LSW(tlv_dma); in qla2x00_get_dcbx_params()
5259 mcp->mb[6] = MSW(MSD(tlv_dma)); in qla2x00_get_dcbx_params()
5260 mcp->mb[7] = LSW(MSD(tlv_dma)); in qla2x00_get_dcbx_params()
5261 mcp->mb[8] = size; in qla2x00_get_dcbx_params()
5270 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", in qla2x00_get_dcbx_params()
5271 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_get_dcbx_params()
5293 mcp->mb[0] = MBC_READ_RAM_EXTENDED; in qla2x00_read_ram_word()
5294 mcp->mb[1] = LSW(risc_addr); in qla2x00_read_ram_word()
5295 mcp->mb[8] = MSW(risc_addr); in qla2x00_read_ram_word()
5303 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_ram_word()
5307 *data = mcp->mb[3] << 16 | mcp->mb[2]; in qla2x00_read_ram_word()
5324 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla2x00_loopback_test()
5325 mcp->mb[0] = MBC_DIAGNOSTIC_LOOP_BACK; in qla2x00_loopback_test()
5326 mcp->mb[1] = mreq->options | BIT_6; // BIT_6 specifies 64 bit addressing in qla2x00_loopback_test()
5329 mcp->mb[10] = LSW(mreq->transfer_size); in qla2x00_loopback_test()
5330 mcp->mb[11] = MSW(mreq->transfer_size); in qla2x00_loopback_test()
5333 mcp->mb[14] = LSW(mreq->send_dma); in qla2x00_loopback_test()
5334 mcp->mb[15] = MSW(mreq->send_dma); in qla2x00_loopback_test()
5335 mcp->mb[20] = LSW(MSD(mreq->send_dma)); in qla2x00_loopback_test()
5336 mcp->mb[21] = MSW(MSD(mreq->send_dma)); in qla2x00_loopback_test()
5339 mcp->mb[16] = LSW(mreq->rcv_dma); in qla2x00_loopback_test()
5340 mcp->mb[17] = MSW(mreq->rcv_dma); in qla2x00_loopback_test()
5341 mcp->mb[6] = LSW(MSD(mreq->rcv_dma)); in qla2x00_loopback_test()
5342 mcp->mb[7] = MSW(MSD(mreq->rcv_dma)); in qla2x00_loopback_test()
5345 mcp->mb[18] = LSW(mreq->iteration_count); in qla2x00_loopback_test()
5346 mcp->mb[19] = MSW(mreq->iteration_count); in qla2x00_loopback_test()
5362 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x mb[3]=%x mb[18]=%x " in qla2x00_loopback_test()
5363 "mb[19]=%x.\n", rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], in qla2x00_loopback_test()
5364 mcp->mb[3], mcp->mb[18], mcp->mb[19]); in qla2x00_loopback_test()
5371 memcpy( mresp, mcp->mb, 64); in qla2x00_loopback_test()
5387 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla2x00_echo_test()
5388 mcp->mb[0] = MBC_DIAGNOSTIC_ECHO; in qla2x00_echo_test()
5390 mcp->mb[1] = mreq->options | BIT_15 | BIT_6; in qla2x00_echo_test()
5392 mcp->mb[2] = vha->fcoe_fcf_idx; in qla2x00_echo_test()
5394 mcp->mb[16] = LSW(mreq->rcv_dma); in qla2x00_echo_test()
5395 mcp->mb[17] = MSW(mreq->rcv_dma); in qla2x00_echo_test()
5396 mcp->mb[6] = LSW(MSD(mreq->rcv_dma)); in qla2x00_echo_test()
5397 mcp->mb[7] = MSW(MSD(mreq->rcv_dma)); in qla2x00_echo_test()
5399 mcp->mb[10] = LSW(mreq->transfer_size); in qla2x00_echo_test()
5401 mcp->mb[14] = LSW(mreq->send_dma); in qla2x00_echo_test()
5402 mcp->mb[15] = MSW(mreq->send_dma); in qla2x00_echo_test()
5403 mcp->mb[20] = LSW(MSD(mreq->send_dma)); in qla2x00_echo_test()
5404 mcp->mb[21] = MSW(MSD(mreq->send_dma)); in qla2x00_echo_test()
5427 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_echo_test()
5428 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_echo_test()
5435 memcpy(mresp, mcp->mb, 64); in qla2x00_echo_test()
5449 mcp->mb[0] = MBC_ISP84XX_RESET; in qla84xx_reset_chip()
5450 mcp->mb[1] = enable_diagnostic; in qla84xx_reset_chip()
5479 mcp->mb[0] = MBC_WRITE_RAM_WORD_EXTENDED; in qla2x00_write_ram_word()
5480 mcp->mb[1] = LSW(risc_addr); in qla2x00_write_ram_word()
5481 mcp->mb[2] = LSW(data); in qla2x00_write_ram_word()
5482 mcp->mb[3] = MSW(data); in qla2x00_write_ram_word()
5483 mcp->mb[8] = MSW(risc_addr); in qla2x00_write_ram_word()
5491 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla2x00_write_ram_word()
5492 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_write_ram_word()
5502 qla81xx_write_mpi_register(scsi_qla_host_t *vha, uint16_t *mb) in qla81xx_write_mpi_register() argument
5519 wrt_reg_word(®->mailbox1, mb[0]); in qla81xx_write_mpi_register()
5520 wrt_reg_word(®->mailbox2, mb[1]); in qla81xx_write_mpi_register()
5521 wrt_reg_word(®->mailbox3, mb[2]); in qla81xx_write_mpi_register()
5522 wrt_reg_word(®->mailbox4, mb[3]); in qla81xx_write_mpi_register()
5554 "Failed=%x mb[0]=%x.\n", rval, mb[0]); in qla81xx_write_mpi_register()
5597 mcp->mb[0] = MBC_DATA_RATE; in qla2x00_set_data_rate()
5598 mcp->mb[1] = mode; in qla2x00_set_data_rate()
5599 mcp->mb[2] = val; in qla2x00_set_data_rate()
5610 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_set_data_rate()
5612 if (mcp->mb[1] != 0x7) in qla2x00_set_data_rate()
5614 "Speed set:0x%x\n", mcp->mb[1]); in qla2x00_set_data_rate()
5637 mcp->mb[0] = MBC_DATA_RATE; in qla2x00_get_data_rate()
5638 mcp->mb[1] = QLA_GET_DATA_RATE; in qla2x00_get_data_rate()
5648 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_data_rate()
5650 if (mcp->mb[1] != 0x7) in qla2x00_get_data_rate()
5651 ha->link_data_rate = mcp->mb[1]; in qla2x00_get_data_rate()
5654 if (mcp->mb[4] & BIT_0) in qla2x00_get_data_rate()
5661 if (mcp->mb[1] != 0x7) in qla2x00_get_data_rate()
5662 ha->link_data_rate = mcp->mb[1]; in qla2x00_get_data_rate()
5669 qla81xx_get_port_config(scsi_qla_host_t *vha, uint16_t *mb) in qla81xx_get_port_config() argument
5682 mcp->mb[0] = MBC_GET_PORT_CONFIG; in qla81xx_get_port_config()
5692 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_get_port_config()
5695 memcpy(mb, &mcp->mb[1], sizeof(uint16_t) * 4); in qla81xx_get_port_config()
5704 qla81xx_set_port_config(scsi_qla_host_t *vha, uint16_t *mb) in qla81xx_set_port_config() argument
5713 mcp->mb[0] = MBC_SET_PORT_CONFIG; in qla81xx_set_port_config()
5715 memcpy(&mcp->mb[1], mb, sizeof(uint16_t) * 4); in qla81xx_set_port_config()
5724 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_set_port_config()
5735 uint16_t *mb) in qla24xx_set_fcp_prio() argument
5748 mcp->mb[0] = MBC_PORT_PARAMS; in qla24xx_set_fcp_prio()
5749 mcp->mb[1] = loop_id; in qla24xx_set_fcp_prio()
5751 mcp->mb[2] = BIT_1; in qla24xx_set_fcp_prio()
5753 mcp->mb[2] = BIT_2; in qla24xx_set_fcp_prio()
5754 mcp->mb[4] = priority & 0xf; in qla24xx_set_fcp_prio()
5755 mcp->mb[9] = vha->vp_idx; in qla24xx_set_fcp_prio()
5761 if (mb != NULL) { in qla24xx_set_fcp_prio()
5762 mb[0] = mcp->mb[0]; in qla24xx_set_fcp_prio()
5763 mb[1] = mcp->mb[1]; in qla24xx_set_fcp_prio()
5764 mb[3] = mcp->mb[3]; in qla24xx_set_fcp_prio()
5765 mb[4] = mcp->mb[4]; in qla24xx_set_fcp_prio()
5840 mcp->mb[0] = MBC_TOGGLE_INTERRUPT; in qla82xx_mbx_intr_enable()
5841 mcp->mb[1] = 1; in qla82xx_mbx_intr_enable()
5851 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_intr_enable()
5875 mcp->mb[0] = MBC_TOGGLE_INTERRUPT; in qla82xx_mbx_intr_disable()
5876 mcp->mb[1] = 0; in qla82xx_mbx_intr_disable()
5886 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_intr_disable()
5906 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla82xx_md_get_template_size()
5907 mcp->mb[0] = LSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla82xx_md_get_template_size()
5908 mcp->mb[1] = MSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla82xx_md_get_template_size()
5909 mcp->mb[2] = LSW(RQST_TMPLT_SIZE); in qla82xx_md_get_template_size()
5910 mcp->mb[3] = MSW(RQST_TMPLT_SIZE); in qla82xx_md_get_template_size()
5924 (mcp->mb[1] << 16) | mcp->mb[0], in qla82xx_md_get_template_size()
5925 (mcp->mb[3] << 16) | mcp->mb[2]); in qla82xx_md_get_template_size()
5929 ha->md_template_size = ((mcp->mb[3] << 16) | mcp->mb[2]); in qla82xx_md_get_template_size()
5958 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla82xx_md_get_template()
5959 mcp->mb[0] = LSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla82xx_md_get_template()
5960 mcp->mb[1] = MSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla82xx_md_get_template()
5961 mcp->mb[2] = LSW(RQST_TMPLT); in qla82xx_md_get_template()
5962 mcp->mb[3] = MSW(RQST_TMPLT); in qla82xx_md_get_template()
5963 mcp->mb[4] = LSW(LSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5964 mcp->mb[5] = MSW(LSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5965 mcp->mb[6] = LSW(MSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5966 mcp->mb[7] = MSW(MSD(ha->md_tmplt_hdr_dma)); in qla82xx_md_get_template()
5967 mcp->mb[8] = LSW(ha->md_template_size); in qla82xx_md_get_template()
5968 mcp->mb[9] = MSW(ha->md_template_size); in qla82xx_md_get_template()
5980 ((mcp->mb[1] << 16) | mcp->mb[0]), in qla82xx_md_get_template()
5981 ((mcp->mb[3] << 16) | mcp->mb[2])); in qla82xx_md_get_template()
6008 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla8044_md_get_template()
6010 mcp->mb[0] = LSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla8044_md_get_template()
6011 mcp->mb[1] = MSW(MBC_DIAGNOSTIC_MINIDUMP_TEMPLATE); in qla8044_md_get_template()
6012 mcp->mb[2] = LSW(RQST_TMPLT); in qla8044_md_get_template()
6013 mcp->mb[3] = MSW(RQST_TMPLT); in qla8044_md_get_template()
6014 mcp->mb[4] = LSW(LSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
6015 mcp->mb[5] = MSW(LSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
6016 mcp->mb[6] = LSW(MSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
6017 mcp->mb[7] = MSW(MSD(ha->md_tmplt_hdr_dma + offset)); in qla8044_md_get_template()
6018 mcp->mb[8] = LSW(size); in qla8044_md_get_template()
6019 mcp->mb[9] = MSW(size); in qla8044_md_get_template()
6020 mcp->mb[10] = offset & 0x0000FFFF; in qla8044_md_get_template()
6021 mcp->mb[11] = offset & 0xFFFF0000; in qla8044_md_get_template()
6032 ((mcp->mb[1] << 16) | mcp->mb[0]), in qla8044_md_get_template()
6033 ((mcp->mb[3] << 16) | mcp->mb[2])); in qla8044_md_get_template()
6058 mcp->mb[0] = MBC_SET_LED_CONFIG; in qla81xx_set_led_config()
6059 mcp->mb[1] = led_cfg[0]; in qla81xx_set_led_config()
6060 mcp->mb[2] = led_cfg[1]; in qla81xx_set_led_config()
6062 mcp->mb[3] = led_cfg[2]; in qla81xx_set_led_config()
6063 mcp->mb[4] = led_cfg[3]; in qla81xx_set_led_config()
6064 mcp->mb[5] = led_cfg[4]; in qla81xx_set_led_config()
6065 mcp->mb[6] = led_cfg[5]; in qla81xx_set_led_config()
6078 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_set_led_config()
6102 mcp->mb[0] = MBC_GET_LED_CONFIG; in qla81xx_get_led_config()
6114 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_get_led_config()
6116 led_cfg[0] = mcp->mb[1]; in qla81xx_get_led_config()
6117 led_cfg[1] = mcp->mb[2]; in qla81xx_get_led_config()
6119 led_cfg[2] = mcp->mb[3]; in qla81xx_get_led_config()
6120 led_cfg[3] = mcp->mb[4]; in qla81xx_get_led_config()
6121 led_cfg[4] = mcp->mb[5]; in qla81xx_get_led_config()
6122 led_cfg[5] = mcp->mb[6]; in qla81xx_get_led_config()
6146 mcp->mb[0] = MBC_SET_LED_CONFIG; in qla82xx_mbx_beacon_ctl()
6148 mcp->mb[7] = 0xE; in qla82xx_mbx_beacon_ctl()
6150 mcp->mb[7] = 0xD; in qla82xx_mbx_beacon_ctl()
6160 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_beacon_ctl()
6183 mcp->mb[0] = MBC_WRITE_REMOTE_REG; in qla83xx_wr_reg()
6184 mcp->mb[1] = LSW(reg); in qla83xx_wr_reg()
6185 mcp->mb[2] = MSW(reg); in qla83xx_wr_reg()
6186 mcp->mb[3] = LSW(data); in qla83xx_wr_reg()
6187 mcp->mb[4] = MSW(data); in qla83xx_wr_reg()
6197 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla83xx_wr_reg()
6225 mcp->mb[0] = MBC_PORT_LOGOUT; in qla2x00_port_logout()
6226 mcp->mb[1] = fcport->loop_id; in qla2x00_port_logout()
6227 mcp->mb[10] = BIT_15; in qla2x00_port_logout()
6235 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_port_logout()
6258 mcp->mb[0] = MBC_READ_REMOTE_REG; in qla83xx_rd_reg()
6259 mcp->mb[1] = LSW(reg); in qla83xx_rd_reg()
6260 mcp->mb[2] = MSW(reg); in qla83xx_rd_reg()
6269 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla83xx_rd_reg()
6270 rval, mcp->mb[0], mcp->mb[1]); in qla83xx_rd_reg()
6272 *data = (mcp->mb[3] | (mcp->mb[4] << 16)); in qla83xx_rd_reg()
6307 mcp->mb[0] = MBC_RESTART_NIC_FIRMWARE; in qla83xx_restart_nic_firmware()
6316 "Failed=%x mb[0]=%x mb[1]=%x.\n", in qla83xx_restart_nic_firmware()
6317 rval, mcp->mb[0], mcp->mb[1]); in qla83xx_restart_nic_firmware()
6341 mcp->mb[0] = MBC_SET_ACCESS_CONTROL; in qla83xx_access_control()
6342 mcp->mb[1] = options; in qla83xx_access_control()
6345 mcp->mb[2] = LSW(start_addr); in qla83xx_access_control()
6346 mcp->mb[3] = MSW(start_addr); in qla83xx_access_control()
6347 mcp->mb[4] = LSW(end_addr); in qla83xx_access_control()
6348 mcp->mb[5] = MSW(end_addr); in qla83xx_access_control()
6360 "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x mb[3]=%x mb[4]=%x.\n", in qla83xx_access_control()
6361 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3], in qla83xx_access_control()
6362 mcp->mb[4]); in qla83xx_access_control()
6366 *sector_size = mcp->mb[1]; in qla83xx_access_control()
6369 "Driver-lock id=%x%x", mcp->mb[4], mcp->mb[3]); in qla83xx_access_control()
6372 "Flash-lock id=%x%x", mcp->mb[4], mcp->mb[3]); in qla83xx_access_control()
6394 mcp->mb[0] = MBC_DUMP_RISC_RAM_EXTENDED; in qla2x00_dump_mctp_data()
6395 mcp->mb[1] = LSW(addr); in qla2x00_dump_mctp_data()
6396 mcp->mb[2] = MSW(req_dma); in qla2x00_dump_mctp_data()
6397 mcp->mb[3] = LSW(req_dma); in qla2x00_dump_mctp_data()
6398 mcp->mb[4] = MSW(size); in qla2x00_dump_mctp_data()
6399 mcp->mb[5] = LSW(size); in qla2x00_dump_mctp_data()
6400 mcp->mb[6] = MSW(MSD(req_dma)); in qla2x00_dump_mctp_data()
6401 mcp->mb[7] = LSW(MSD(req_dma)); in qla2x00_dump_mctp_data()
6402 mcp->mb[8] = MSW(addr); in qla2x00_dump_mctp_data()
6405 mcp->mb[10] = BIT_7 | 0x40; in qla2x00_dump_mctp_data()
6417 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_dump_mctp_data()
6451 mcp->mb[0] = MBC_DPORT_DIAGNOSTICS; in qla26xx_dport_diagnostics()
6452 mcp->mb[1] = options; in qla26xx_dport_diagnostics()
6453 mcp->mb[2] = MSW(LSD(dd_dma)); in qla26xx_dport_diagnostics()
6454 mcp->mb[3] = LSW(LSD(dd_dma)); in qla26xx_dport_diagnostics()
6455 mcp->mb[6] = MSW(MSD(dd_dma)); in qla26xx_dport_diagnostics()
6456 mcp->mb[7] = LSW(MSD(dd_dma)); in qla26xx_dport_diagnostics()
6457 mcp->mb[8] = size; in qla26xx_dport_diagnostics()
6500 mcp->mb[0] = MBC_DPORT_DIAGNOSTICS; in qla26xx_dport_diagnostics_v2()
6501 mcp->mb[1] = options; in qla26xx_dport_diagnostics_v2()
6502 mcp->mb[2] = MSW(LSD(dd_dma)); in qla26xx_dport_diagnostics_v2()
6503 mcp->mb[3] = LSW(LSD(dd_dma)); in qla26xx_dport_diagnostics_v2()
6504 mcp->mb[6] = MSW(MSD(dd_dma)); in qla26xx_dport_diagnostics_v2()
6505 mcp->mb[7] = LSW(MSD(dd_dma)); in qla26xx_dport_diagnostics_v2()
6506 mcp->mb[8] = size; in qla26xx_dport_diagnostics_v2()
6535 * This mailbox uses the iocb interface to send MB command.
6557 sp->name = mb_to_str(mcp->mb[0]); in qla24xx_send_mb_cmd()
6561 memcpy(sp->u.iocb_cmd.u.mbx.out_mb, mcp->mb, SIZEOF_IOCB_MB_REG); in qla24xx_send_mb_cmd()
6571 ql_dbg(ql_dbg_mbx, vha, 0x113f, "MB:%s hndl %x submitted\n", in qla24xx_send_mb_cmd()
6575 memcpy(mcp->mb, sp->u.iocb_cmd.u.mbx.in_mb, SIZEOF_IOCB_MB_REG); in qla24xx_send_mb_cmd()
6623 mc.mb[0] = MBC_GET_PORT_DATABASE; in qla24xx_gpdb_wait()
6624 mc.mb[1] = fcport->loop_id; in qla24xx_gpdb_wait()
6625 mc.mb[2] = MSW(pd_dma); in qla24xx_gpdb_wait()
6626 mc.mb[3] = LSW(pd_dma); in qla24xx_gpdb_wait()
6627 mc.mb[6] = MSW(MSD(pd_dma)); in qla24xx_gpdb_wait()
6628 mc.mb[7] = LSW(MSD(pd_dma)); in qla24xx_gpdb_wait()
6629 mc.mb[9] = vha->vp_idx; in qla24xx_gpdb_wait()
6630 mc.mb[10] = opt; in qla24xx_gpdb_wait()
6741 mc.mb[0] = MBC_GET_ID_LIST; in qla24xx_gidlist_wait()
6742 mc.mb[2] = MSW(id_list_dma); in qla24xx_gidlist_wait()
6743 mc.mb[3] = LSW(id_list_dma); in qla24xx_gidlist_wait()
6744 mc.mb[6] = MSW(MSD(id_list_dma)); in qla24xx_gidlist_wait()
6745 mc.mb[7] = LSW(MSD(id_list_dma)); in qla24xx_gidlist_wait()
6746 mc.mb[8] = 0; in qla24xx_gidlist_wait()
6747 mc.mb[9] = vha->vp_idx; in qla24xx_gidlist_wait()
6754 *entries = mc.mb[1]; in qla24xx_gidlist_wait()
6771 memset(mcp->mb, 0 , sizeof(mcp->mb)); in qla27xx_set_zio_threshold()
6772 mcp->mb[0] = MBC_GET_SET_ZIO_THRESHOLD; in qla27xx_set_zio_threshold()
6773 mcp->mb[1] = 1; in qla27xx_set_zio_threshold()
6774 mcp->mb[2] = value; in qla27xx_set_zio_threshold()
6797 memset(mcp->mb, 0, sizeof(mcp->mb)); in qla27xx_get_zio_threshold()
6798 mcp->mb[0] = MBC_GET_SET_ZIO_THRESHOLD; in qla27xx_get_zio_threshold()
6799 mcp->mb[1] = 0; in qla27xx_get_zio_threshold()
6807 *value = mc.mb[2]; in qla27xx_get_zio_threshold()
6877 mc.mb[0] = MBC_GET_RESOURCE_COUNTS; in qla24xx_res_count_wait()
6885 memcpy(out_mb, mc.mb, out_mb_sz); in qla24xx_res_count_wait()
6887 memcpy(out_mb, mc.mb, SIZEOF_IOCB_MB_REG); in qla24xx_res_count_wait()
6904 mcp->mb[0] = MBC_SECURE_FLASH_UPDATE; in qla28xx_secure_flash_update()
6905 mcp->mb[1] = opts; in qla28xx_secure_flash_update()
6906 mcp->mb[2] = region; in qla28xx_secure_flash_update()
6907 mcp->mb[3] = MSW(len); in qla28xx_secure_flash_update()
6908 mcp->mb[4] = LSW(len); in qla28xx_secure_flash_update()
6909 mcp->mb[5] = MSW(sfub_dma_addr); in qla28xx_secure_flash_update()
6910 mcp->mb[6] = LSW(sfub_dma_addr); in qla28xx_secure_flash_update()
6911 mcp->mb[7] = MSW(MSD(sfub_dma_addr)); in qla28xx_secure_flash_update()
6912 mcp->mb[8] = LSW(MSD(sfub_dma_addr)); in qla28xx_secure_flash_update()
6913 mcp->mb[9] = sfub_len; in qla28xx_secure_flash_update()
6923 __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1], in qla28xx_secure_flash_update()
6924 mcp->mb[2]); in qla28xx_secure_flash_update()
6940 mcp->mb[0] = MBC_WRITE_REMOTE_REG; in qla2xxx_write_remote_register()
6941 mcp->mb[1] = LSW(addr); in qla2xxx_write_remote_register()
6942 mcp->mb[2] = MSW(addr); in qla2xxx_write_remote_register()
6943 mcp->mb[3] = LSW(data); in qla2xxx_write_remote_register()
6944 mcp->mb[4] = MSW(data); in qla2xxx_write_remote_register()
6953 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2xxx_write_remote_register()
6972 mcp->mb[0] = MBC_READ_REMOTE_REG; in qla2xxx_read_remote_register()
6973 mcp->mb[1] = LSW(addr); in qla2xxx_read_remote_register()
6974 mcp->mb[2] = MSW(addr); in qla2xxx_read_remote_register()
6981 *data = (uint32_t)((((uint32_t)mcp->mb[4]) << 16) | mcp->mb[3]); in qla2xxx_read_remote_register()
6985 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2xxx_read_remote_register()
7008 mcp->mb[0] = MBC_SET_GET_FC_LED_CONFIG; in ql26xx_led_config()
7009 mcp->mb[1] = options; in ql26xx_led_config()
7014 mcp->mb[2] = led[2]; in ql26xx_led_config()
7018 mcp->mb[3] = led[0]; in ql26xx_led_config()
7022 mcp->mb[4] = led[1]; in ql26xx_led_config()
7032 ql_dbg(ql_dbg_mbx, vha, 0x7071, "Failed %s %x (mb=%x,%x)\n", in ql26xx_led_config()
7033 __func__, rval, mcp->mb[0], mcp->mb[1]); in ql26xx_led_config()
7041 led[2] = mcp->mb[2]; in ql26xx_led_config()
7042 led[0] = mcp->mb[3]; in ql26xx_led_config()
7043 led[1] = mcp->mb[4]; in ql26xx_led_config()
7052 * qla_no_op_mb(): This MB is used to check if FW is still alive and
7065 mcp->mb[0] = 0; // noop cmd= 0 in qla_no_op_mb()
7087 memcpy(&mcp->mb, (char *)mbx_in, (32 * sizeof(uint16_t))); in qla_mailbox_passthru()
7100 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla_mailbox_passthru()
7105 memcpy(mbx_out, &mcp->mb, 32 * sizeof(uint16_t)); in qla_mailbox_passthru()