Lines Matching refs:rval
36 int rval, i; in qla2x00_mailbox_command() local
77 rval = QLA_SUCCESS; in qla2x00_mailbox_command()
171 rval = QLA_FUNCTION_TIMEOUT; in qla2x00_mailbox_command()
201 rval = QLA_FUNCTION_TIMEOUT; in qla2x00_mailbox_command()
245 rval = QLA_FUNCTION_FAILED; in qla2x00_mailbox_command()
252 rval = QLA_FUNCTION_FAILED; in qla2x00_mailbox_command()
303 rval = QLA_FUNCTION_TIMEOUT; in qla2x00_mailbox_command()
314 rval = QLA_FUNCTION_TIMEOUT; in qla2x00_mailbox_command()
331 if (rval == QLA_FUNCTION_TIMEOUT && in qla2x00_mailbox_command()
402 if (rval) { in qla2x00_mailbox_command()
422 return rval; in qla2x00_mailbox_command()
429 int rval; in qla2x00_load_ram() local
463 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_load_ram()
465 if (rval != QLA_SUCCESS) { in qla2x00_load_ram()
467 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_load_ram()
473 return rval; in qla2x00_load_ram()
495 int rval; in qla2x00_execute_fw() local
537 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_execute_fw()
539 if (rval != QLA_SUCCESS) { in qla2x00_execute_fw()
541 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_execute_fw()
552 return rval; in qla2x00_execute_fw()
575 int rval; in qla_get_exlogin_status() local
590 rval = qla2x00_mailbox_command(vha, mcp); in qla_get_exlogin_status()
591 if (rval != QLA_SUCCESS) { in qla_get_exlogin_status()
592 ql_dbg(ql_dbg_mbx, vha, 0x1115, "Failed=%x.\n", rval); in qla_get_exlogin_status()
605 return rval; in qla_get_exlogin_status()
631 int rval; in qla_set_exlogin_mem_cfg() local
653 rval = qla2x00_mailbox_command(vha, mcp); in qla_set_exlogin_mem_cfg()
654 if (rval != QLA_SUCCESS) { in qla_set_exlogin_mem_cfg()
656 ql_dbg(ql_dbg_mbx, vha, 0x111b, "Failed=%x.\n", rval); in qla_set_exlogin_mem_cfg()
663 return rval; in qla_set_exlogin_mem_cfg()
686 int rval; in qla_get_exchoffld_status() local
701 rval = qla2x00_mailbox_command(vha, mcp); in qla_get_exchoffld_status()
702 if (rval != QLA_SUCCESS) { in qla_get_exchoffld_status()
703 ql_dbg(ql_dbg_mbx, vha, 0x1155, "Failed=%x.\n", rval); in qla_get_exchoffld_status()
716 return rval; in qla_get_exchoffld_status()
742 int rval; in qla_set_exchoffld_mem_cfg() local
763 rval = qla2x00_mailbox_command(vha, mcp); in qla_set_exchoffld_mem_cfg()
764 if (rval != QLA_SUCCESS) { in qla_set_exchoffld_mem_cfg()
766 ql_dbg(ql_dbg_mbx, vha, 0x1158, "Failed=%x.\n", rval); in qla_set_exchoffld_mem_cfg()
772 return rval; in qla_set_exchoffld_mem_cfg()
794 int rval; in qla2x00_get_fw_version() local
816 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_fw_version()
817 if (rval != QLA_SUCCESS) in qla2x00_get_fw_version()
876 if (rval != QLA_SUCCESS) { in qla2x00_get_fw_version()
878 ql_dbg(ql_dbg_mbx, vha, 0x102a, "Failed=%x.\n", rval); in qla2x00_get_fw_version()
884 return rval; in qla2x00_get_fw_version()
904 int rval; in qla2x00_get_fw_options() local
916 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_fw_options()
918 if (rval != QLA_SUCCESS) { in qla2x00_get_fw_options()
920 ql_dbg(ql_dbg_mbx, vha, 0x102d, "Failed=%x.\n", rval); in qla2x00_get_fw_options()
931 return rval; in qla2x00_get_fw_options()
952 int rval; in qla2x00_set_fw_options() local
975 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_set_fw_options()
979 if (rval != QLA_SUCCESS) { in qla2x00_set_fw_options()
982 "Failed=%x (%x/%x).\n", rval, mcp->mb[0], mcp->mb[1]); in qla2x00_set_fw_options()
989 return rval; in qla2x00_set_fw_options()
1010 int rval; in qla2x00_mbx_reg_test() local
1029 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_mbx_reg_test()
1031 if (rval == QLA_SUCCESS) { in qla2x00_mbx_reg_test()
1034 rval = QLA_FUNCTION_FAILED; in qla2x00_mbx_reg_test()
1037 rval = QLA_FUNCTION_FAILED; in qla2x00_mbx_reg_test()
1040 if (rval != QLA_SUCCESS) { in qla2x00_mbx_reg_test()
1042 ql_dbg(ql_dbg_mbx, vha, 0x1033, "Failed=%x.\n", rval); in qla2x00_mbx_reg_test()
1049 return rval; in qla2x00_mbx_reg_test()
1070 int rval; in qla2x00_verify_checksum() local
1093 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_verify_checksum()
1095 if (rval != QLA_SUCCESS) { in qla2x00_verify_checksum()
1097 "Failed=%x chm sum=%x.\n", rval, IS_FWI2_CAPABLE(vha->hw) ? in qla2x00_verify_checksum()
1104 return rval; in qla2x00_verify_checksum()
1129 int rval; in qla2x00_issue_iocb_timeout() local
1146 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_issue_iocb_timeout()
1148 if (rval != QLA_SUCCESS) { in qla2x00_issue_iocb_timeout()
1150 ql_dbg(ql_dbg_mbx, vha, 0x1039, "Failed=%x.\n", rval); in qla2x00_issue_iocb_timeout()
1161 return rval; in qla2x00_issue_iocb_timeout()
1190 int rval; in qla2x00_abort_command() local
1227 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_abort_command()
1229 if (rval != QLA_SUCCESS) { in qla2x00_abort_command()
1230 ql_dbg(ql_dbg_mbx, vha, 0x103c, "Failed=%x.\n", rval); in qla2x00_abort_command()
1236 return rval; in qla2x00_abort_command()
1242 int rval, rval2; in qla2x00_abort_target() local
1272 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_abort_target()
1273 if (rval != QLA_SUCCESS) { in qla2x00_abort_target()
1275 "Failed=%x.\n", rval); in qla2x00_abort_target()
1289 return rval; in qla2x00_abort_target()
1295 int rval, rval2; in qla2x00_lun_reset() local
1322 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_lun_reset()
1323 if (rval != QLA_SUCCESS) { in qla2x00_lun_reset()
1324 ql_dbg(ql_dbg_mbx, vha, 0x1043, "Failed=%x.\n", rval); in qla2x00_lun_reset()
1338 return rval; in qla2x00_lun_reset()
1365 int rval; in qla2x00_get_adapter_id() local
1384 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_adapter_id()
1386 rval = QLA_COMMAND_ERROR; in qla2x00_get_adapter_id()
1388 rval = QLA_INVALID_COMMAND; in qla2x00_get_adapter_id()
1398 if (rval != QLA_SUCCESS) { in qla2x00_get_adapter_id()
1400 ql_dbg(ql_dbg_mbx, vha, 0x1047, "Failed=%x.\n", rval); in qla2x00_get_adapter_id()
1438 return rval; in qla2x00_get_adapter_id()
1460 int rval; in qla2x00_get_retry_cnt() local
1473 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_retry_cnt()
1475 if (rval != QLA_SUCCESS) { in qla2x00_get_retry_cnt()
1478 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_retry_cnt()
1493 return rval; in qla2x00_get_retry_cnt()
1516 int rval; in qla2x00_init_firmware() local
1556 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_init_firmware()
1558 if (rval != QLA_SUCCESS) { in qla2x00_init_firmware()
1562 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3]); in qla2x00_init_firmware()
1569 return rval; in qla2x00_init_firmware()
1597 int rval, left; in qla2x00_get_node_name_list() local
1608 rval = QLA_MEMORY_ALLOC_FAILED; in qla2x00_get_node_name_list()
1624 rval = qla2x00_mailbox_command(vha, &mc); in qla2x00_get_node_name_list()
1625 if (rval != QLA_SUCCESS) { in qla2x00_get_node_name_list()
1642 rval = QLA_MEMORY_ALLOC_FAILED; in qla2x00_get_node_name_list()
1654 return rval; in qla2x00_get_node_name_list()
1658 return rval; in qla2x00_get_node_name_list()
1680 int rval; in qla2x00_get_port_database() local
1727 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_port_database()
1728 if (rval != QLA_SUCCESS) in qla2x00_get_port_database()
1742 rval = QLA_FUNCTION_FAILED; in qla2x00_get_port_database()
1750 rval = QLA_NOT_LOGGED_IN; in qla2x00_get_port_database()
1787 rval = QLA_FUNCTION_FAILED; in qla2x00_get_port_database()
1795 rval = QLA_NOT_LOGGED_IN; in qla2x00_get_port_database()
1823 if (rval != QLA_SUCCESS) { in qla2x00_get_port_database()
1825 "Failed=%x mb[0]=%x mb[1]=%x.\n", rval, in qla2x00_get_port_database()
1832 return rval; in qla2x00_get_port_database()
1854 int rval; in qla2x00_get_firmware_state() local
1869 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_firmware_state()
1881 if (rval != QLA_SUCCESS) { in qla2x00_get_firmware_state()
1883 ql_dbg(ql_dbg_mbx, vha, 0x1055, "Failed=%x.\n", rval); in qla2x00_get_firmware_state()
1890 return rval; in qla2x00_get_firmware_state()
1915 int rval; in qla2x00_get_port_name() local
1936 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_port_name()
1938 if (rval != QLA_SUCCESS) { in qla2x00_get_port_name()
1940 ql_dbg(ql_dbg_mbx, vha, 0x1058, "Failed=%x.\n", rval); in qla2x00_get_port_name()
1958 return rval; in qla2x00_get_port_name()
1979 int rval; in qla24xx_link_initialize() local
2001 rval = qla2x00_mailbox_command(vha, mcp); in qla24xx_link_initialize()
2003 if (rval != QLA_SUCCESS) { in qla24xx_link_initialize()
2004 ql_dbg(ql_dbg_mbx, vha, 0x1153, "Failed=%x.\n", rval); in qla24xx_link_initialize()
2010 return rval; in qla24xx_link_initialize()
2031 int rval; in qla2x00_lip_reset() local
2066 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_lip_reset()
2068 if (rval != QLA_SUCCESS) { in qla2x00_lip_reset()
2070 ql_dbg(ql_dbg_mbx, vha, 0x105b, "Failed=%x.\n", rval); in qla2x00_lip_reset()
2077 return rval; in qla2x00_lip_reset()
2102 int rval; in qla2x00_send_sns() local
2124 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_send_sns()
2126 if (rval != QLA_SUCCESS) { in qla2x00_send_sns()
2130 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_send_sns()
2137 return rval; in qla2x00_send_sns()
2144 int rval; in qla24xx_login_fabric() local
2181 rval = qla2x00_issue_iocb_timeout(vha, lg, lg_dma, 0, in qla24xx_login_fabric()
2183 if (rval != QLA_SUCCESS) { in qla24xx_login_fabric()
2185 "Failed to issue login IOCB (%x).\n", rval); in qla24xx_login_fabric()
2190 rval = QLA_FUNCTION_FAILED; in qla24xx_login_fabric()
2253 return rval; in qla24xx_login_fabric()
2281 int rval; in qla2x00_login_fabric() local
2304 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_login_fabric()
2317 if (rval != QLA_SUCCESS) { in qla2x00_login_fabric()
2327 rval = QLA_SUCCESS; in qla2x00_login_fabric()
2332 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_login_fabric()
2339 return rval; in qla2x00_login_fabric()
2362 int rval; in qla2x00_login_local_device() local
2385 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_login_local_device()
2395 if (rval != QLA_SUCCESS) { in qla2x00_login_local_device()
2403 rval = QLA_SUCCESS; in qla2x00_login_local_device()
2407 rval, mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7]); in qla2x00_login_local_device()
2414 return (rval); in qla2x00_login_local_device()
2421 int rval; in qla24xx_fabric_logout() local
2453 rval = qla2x00_issue_iocb_timeout(vha, lg, lg_dma, 0, in qla24xx_fabric_logout()
2455 if (rval != QLA_SUCCESS) { in qla24xx_fabric_logout()
2457 "Failed to issue logout IOCB (%x).\n", rval); in qla24xx_fabric_logout()
2462 rval = QLA_FUNCTION_FAILED; in qla24xx_fabric_logout()
2477 return rval; in qla24xx_fabric_logout()
2500 int rval; in qla2x00_fabric_logout() local
2520 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_fabric_logout()
2522 if (rval != QLA_SUCCESS) { in qla2x00_fabric_logout()
2525 "Failed=%x mb[1]=%x.\n", rval, mcp->mb[1]); in qla2x00_fabric_logout()
2532 return rval; in qla2x00_fabric_logout()
2553 int rval; in qla2x00_full_login_lip() local
2568 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_full_login_lip()
2570 if (rval != QLA_SUCCESS) { in qla2x00_full_login_lip()
2572 ql_dbg(ql_dbg_mbx, vha, 0x1077, "Failed=%x.\n", rval); in qla2x00_full_login_lip()
2579 return rval; in qla2x00_full_login_lip()
2598 int rval; in qla2x00_get_id_list() local
2628 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_id_list()
2630 if (rval != QLA_SUCCESS) { in qla2x00_get_id_list()
2632 ql_dbg(ql_dbg_mbx, vha, 0x107a, "Failed=%x.\n", rval); in qla2x00_get_id_list()
2639 return rval; in qla2x00_get_id_list()
2659 int rval; in qla2x00_get_resource_cnts() local
2673 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_resource_cnts()
2675 if (rval != QLA_SUCCESS) { in qla2x00_get_resource_cnts()
2698 return (rval); in qla2x00_get_resource_cnts()
2718 int rval; in qla2x00_get_fcal_position_map() local
2746 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_fcal_position_map()
2748 if (rval == QLA_SUCCESS) { in qla2x00_get_fcal_position_map()
2760 if (rval != QLA_SUCCESS) { in qla2x00_get_fcal_position_map()
2761 ql_dbg(ql_dbg_mbx, vha, 0x1082, "Failed=%x.\n", rval); in qla2x00_get_fcal_position_map()
2767 return rval; in qla2x00_get_fcal_position_map()
2787 int rval; in qla2x00_get_link_status() local
2820 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_link_status()
2822 if (rval == QLA_SUCCESS) { in qla2x00_get_link_status()
2825 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_link_status()
2826 rval = QLA_FUNCTION_FAILED; in qla2x00_get_link_status()
2836 ql_dbg(ql_dbg_mbx, vha, 0x1087, "Failed=%x.\n", rval); in qla2x00_get_link_status()
2839 return rval; in qla2x00_get_link_status()
2846 int rval; in qla24xx_get_isp_stats() local
2866 rval = qla2x00_mailbox_command(vha, mcp); in qla24xx_get_isp_stats()
2868 if (rval == QLA_SUCCESS) { in qla24xx_get_isp_stats()
2872 rval = QLA_FUNCTION_FAILED; in qla24xx_get_isp_stats()
2884 ql_dbg(ql_dbg_mbx, vha, 0x108b, "Failed=%x.\n", rval); in qla24xx_get_isp_stats()
2887 return rval; in qla24xx_get_isp_stats()
2893 int rval; in qla24xx_abort_command() local
2941 rval = qla2x00_issue_iocb(vha, abt, abt_dma, 0); in qla24xx_abort_command()
2942 if (rval != QLA_SUCCESS) { in qla24xx_abort_command()
2944 "Failed to issue IOCB (%x).\n", rval); in qla24xx_abort_command()
2949 rval = QLA_FUNCTION_FAILED; in qla24xx_abort_command()
2955 rval = QLA_FUNCTION_PARAMETER_ERROR; in qla24xx_abort_command()
2957 rval = QLA_FUNCTION_FAILED; in qla24xx_abort_command()
2965 return rval; in qla24xx_abort_command()
2979 int rval, rval2; in __qla24xx_issue_tmf() local
3024 rval = qla2x00_issue_iocb(vha, tsk, tsk_dma, 0); in __qla24xx_issue_tmf()
3025 if (rval != QLA_SUCCESS) { in __qla24xx_issue_tmf()
3027 "Failed to issue %s reset IOCB (%x).\n", name, rval); in __qla24xx_issue_tmf()
3032 rval = QLA_FUNCTION_FAILED; in __qla24xx_issue_tmf()
3037 rval = QLA_FUNCTION_FAILED; in __qla24xx_issue_tmf()
3049 rval = QLA_FUNCTION_FAILED; in __qla24xx_issue_tmf()
3066 return rval; in __qla24xx_issue_tmf()
3094 int rval; in qla2x00_system_error() local
3110 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_system_error()
3112 if (rval != QLA_SUCCESS) { in qla2x00_system_error()
3113 ql_dbg(ql_dbg_mbx, vha, 0x109c, "Failed=%x.\n", rval); in qla2x00_system_error()
3119 return rval; in qla2x00_system_error()
3125 int rval; in qla2x00_write_serdes_word() local
3148 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_write_serdes_word()
3150 if (rval != QLA_SUCCESS) { in qla2x00_write_serdes_word()
3152 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_write_serdes_word()
3158 return rval; in qla2x00_write_serdes_word()
3164 int rval; in qla2x00_read_serdes_word() local
3182 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_read_serdes_word()
3189 if (rval != QLA_SUCCESS) { in qla2x00_read_serdes_word()
3191 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_serdes_word()
3197 return rval; in qla2x00_read_serdes_word()
3203 int rval; in qla8044_write_serdes_word() local
3223 rval = qla2x00_mailbox_command(vha, mcp); in qla8044_write_serdes_word()
3225 if (rval != QLA_SUCCESS) { in qla8044_write_serdes_word()
3227 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla8044_write_serdes_word()
3233 return rval; in qla8044_write_serdes_word()
3239 int rval; in qla8044_read_serdes_word() local
3257 rval = qla2x00_mailbox_command(vha, mcp); in qla8044_read_serdes_word()
3261 if (rval != QLA_SUCCESS) { in qla8044_read_serdes_word()
3263 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla8044_read_serdes_word()
3269 return rval; in qla8044_read_serdes_word()
3282 int rval; in qla2x00_set_serdes_params() local
3298 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_set_serdes_params()
3300 if (rval != QLA_SUCCESS) { in qla2x00_set_serdes_params()
3303 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_set_serdes_params()
3310 return rval; in qla2x00_set_serdes_params()
3316 int rval; in qla2x00_stop_firmware() local
3332 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_stop_firmware()
3334 if (rval != QLA_SUCCESS) { in qla2x00_stop_firmware()
3335 ql_dbg(ql_dbg_mbx, vha, 0x10a2, "Failed=%x.\n", rval); in qla2x00_stop_firmware()
3337 rval = QLA_INVALID_COMMAND; in qla2x00_stop_firmware()
3343 return rval; in qla2x00_stop_firmware()
3350 int rval; in qla2x00_enable_eft_trace() local
3375 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_enable_eft_trace()
3376 if (rval != QLA_SUCCESS) { in qla2x00_enable_eft_trace()
3379 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_enable_eft_trace()
3385 return rval; in qla2x00_enable_eft_trace()
3391 int rval; in qla2x00_disable_eft_trace() local
3410 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_disable_eft_trace()
3411 if (rval != QLA_SUCCESS) { in qla2x00_disable_eft_trace()
3414 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_disable_eft_trace()
3420 return rval; in qla2x00_disable_eft_trace()
3427 int rval; in qla2x00_enable_fce_trace() local
3457 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_enable_fce_trace()
3458 if (rval != QLA_SUCCESS) { in qla2x00_enable_fce_trace()
3461 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_enable_fce_trace()
3472 return rval; in qla2x00_enable_fce_trace()
3478 int rval; in qla2x00_disable_fce_trace() local
3499 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_disable_fce_trace()
3500 if (rval != QLA_SUCCESS) { in qla2x00_disable_fce_trace()
3503 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_disable_fce_trace()
3520 return rval; in qla2x00_disable_fce_trace()
3527 int rval; in qla2x00_get_idma_speed() local
3545 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_idma_speed()
3554 if (rval != QLA_SUCCESS) { in qla2x00_get_idma_speed()
3555 ql_dbg(ql_dbg_mbx, vha, 0x10b1, "Failed=%x.\n", rval); in qla2x00_get_idma_speed()
3563 return rval; in qla2x00_get_idma_speed()
3570 int rval; in qla2x00_set_idma_speed() local
3592 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_set_idma_speed()
3601 if (rval != QLA_SUCCESS) { in qla2x00_set_idma_speed()
3603 "Failed=%x.\n", rval); in qla2x00_set_idma_speed()
3609 return rval; in qla2x00_set_idma_speed()
3723 int rval; in qla24xx_modify_vp_config() local
3755 rval = qla2x00_issue_iocb(base_vha, vpmod, vpmod_dma, 0); in qla24xx_modify_vp_config()
3756 if (rval != QLA_SUCCESS) { in qla24xx_modify_vp_config()
3758 "Failed to issue VP config IOCB (%x).\n", rval); in qla24xx_modify_vp_config()
3763 rval = QLA_FUNCTION_FAILED; in qla24xx_modify_vp_config()
3768 rval = QLA_FUNCTION_FAILED; in qla24xx_modify_vp_config()
3777 return rval; in qla24xx_modify_vp_config()
3798 int rval; in qla24xx_control_vp() local
3834 rval = qla2x00_issue_iocb(base_vha, vce, vce_dma, 0); in qla24xx_control_vp()
3835 if (rval != QLA_SUCCESS) { in qla24xx_control_vp()
3837 "Failed to issue VP control IOCB (%x).\n", rval); in qla24xx_control_vp()
3842 rval = QLA_FUNCTION_FAILED; in qla24xx_control_vp()
3847 rval = QLA_FUNCTION_FAILED; in qla24xx_control_vp()
3855 return rval; in qla24xx_control_vp()
3883 int rval; in qla2x00_send_change_request() local
3897 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_send_change_request()
3899 if (rval == QLA_SUCCESS) { in qla2x00_send_change_request()
3901 rval = BIT_1; in qla2x00_send_change_request()
3904 rval = BIT_1; in qla2x00_send_change_request()
3906 return rval; in qla2x00_send_change_request()
3913 int rval; in qla2x00_dump_ram() local
3946 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_dump_ram()
3948 if (rval != QLA_SUCCESS) { in qla2x00_dump_ram()
3950 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_dump_ram()
3956 return rval; in qla2x00_dump_ram()
3970 int rval, retry; in qla84xx_verify_chip() local
4004 rval = qla2x00_issue_iocb_timeout(vha, mn, mn_dma, 0, 120); in qla84xx_verify_chip()
4005 if (rval != QLA_SUCCESS) { in qla84xx_verify_chip()
4007 "Failed to issue verify IOCB (%x).\n", rval); in qla84xx_verify_chip()
4023 rval = QLA_FUNCTION_FAILED; in qla84xx_verify_chip()
4049 if (rval != QLA_SUCCESS) { in qla84xx_verify_chip()
4051 "Failed=%x.\n", rval); in qla84xx_verify_chip()
4057 return rval; in qla84xx_verify_chip()
4063 int rval; in qla25xx_init_req_que() local
4117 rval = qla2x00_mailbox_command(vha, mcp); in qla25xx_init_req_que()
4118 if (rval != QLA_SUCCESS) { in qla25xx_init_req_que()
4120 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla25xx_init_req_que()
4126 return rval; in qla25xx_init_req_que()
4132 int rval; in qla25xx_init_rsp_que() local
4186 rval = qla2x00_mailbox_command(vha, mcp); in qla25xx_init_rsp_que()
4187 if (rval != QLA_SUCCESS) { in qla25xx_init_rsp_que()
4189 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla25xx_init_rsp_que()
4195 return rval; in qla25xx_init_rsp_que()
4201 int rval; in qla81xx_idc_ack() local
4214 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_idc_ack()
4216 if (rval != QLA_SUCCESS) { in qla81xx_idc_ack()
4218 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_idc_ack()
4224 return rval; in qla81xx_idc_ack()
4230 int rval; in qla81xx_fac_get_sector_size() local
4247 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_fac_get_sector_size()
4249 if (rval != QLA_SUCCESS) { in qla81xx_fac_get_sector_size()
4252 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_fac_get_sector_size()
4259 return rval; in qla81xx_fac_get_sector_size()
4265 int rval; in qla81xx_fac_do_write_enable() local
4283 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_fac_do_write_enable()
4285 if (rval != QLA_SUCCESS) { in qla81xx_fac_do_write_enable()
4288 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_fac_do_write_enable()
4294 return rval; in qla81xx_fac_do_write_enable()
4300 int rval; in qla81xx_fac_erase_sector() local
4321 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_fac_erase_sector()
4323 if (rval != QLA_SUCCESS) { in qla81xx_fac_erase_sector()
4326 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla81xx_fac_erase_sector()
4332 return rval; in qla81xx_fac_erase_sector()
4338 int rval = 0; in qla81xx_restart_mpi_firmware() local
4350 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_restart_mpi_firmware()
4352 if (rval != QLA_SUCCESS) { in qla81xx_restart_mpi_firmware()
4355 rval, mcp->mb[0], mcp->mb[1]); in qla81xx_restart_mpi_firmware()
4361 return rval; in qla81xx_restart_mpi_firmware()
4367 int rval; in qla82xx_set_driver_version() local
4398 rval = qla2x00_mailbox_command(vha, mcp); in qla82xx_set_driver_version()
4400 if (rval != QLA_SUCCESS) { in qla82xx_set_driver_version()
4402 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla82xx_set_driver_version()
4408 return rval; in qla82xx_set_driver_version()
4414 int rval; in qla25xx_set_driver_version() local
4455 rval = qla2x00_mailbox_command(vha, mcp); in qla25xx_set_driver_version()
4457 if (rval != QLA_SUCCESS) { in qla25xx_set_driver_version()
4459 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla25xx_set_driver_version()
4467 return rval; in qla25xx_set_driver_version()
4473 int rval; in qla2x00_read_asic_temperature() local
4489 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_read_asic_temperature()
4492 if (rval != QLA_SUCCESS) { in qla2x00_read_asic_temperature()
4494 "Failed=%x mb[0]=%x,%x.\n", rval, mcp->mb[0], mcp->mb[1]); in qla2x00_read_asic_temperature()
4500 return rval; in qla2x00_read_asic_temperature()
4507 int rval; in qla2x00_read_sfp() local
4534 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_read_sfp()
4539 if (rval != QLA_SUCCESS) { in qla2x00_read_sfp()
4541 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_sfp()
4547 return rval; in qla2x00_read_sfp()
4554 int rval; in qla2x00_write_sfp() local
4584 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_write_sfp()
4586 if (rval != QLA_SUCCESS) { in qla2x00_write_sfp()
4588 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_write_sfp()
4594 return rval; in qla2x00_write_sfp()
4601 int rval; in qla2x00_get_xgmac_stats() local
4621 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_xgmac_stats()
4623 if (rval != QLA_SUCCESS) { in qla2x00_get_xgmac_stats()
4626 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_get_xgmac_stats()
4635 return rval; in qla2x00_get_xgmac_stats()
4642 int rval; in qla2x00_get_dcbx_params() local
4663 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_dcbx_params()
4665 if (rval != QLA_SUCCESS) { in qla2x00_get_dcbx_params()
4668 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); in qla2x00_get_dcbx_params()
4674 return rval; in qla2x00_get_dcbx_params()
4680 int rval; in qla2x00_read_ram_word() local
4697 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_read_ram_word()
4698 if (rval != QLA_SUCCESS) { in qla2x00_read_ram_word()
4700 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_read_ram_word()
4707 return rval; in qla2x00_read_ram_word()
4714 int rval; in qla2x00_loopback_test() local
4755 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_loopback_test()
4757 if (rval != QLA_SUCCESS) { in qla2x00_loopback_test()
4760 "mb[19]=%x.\n", rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], in qla2x00_loopback_test()
4769 return rval; in qla2x00_loopback_test()
4776 int rval; in qla2x00_echo_test() local
4819 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_echo_test()
4821 if (rval != QLA_SUCCESS) { in qla2x00_echo_test()
4824 rval, mcp->mb[0], mcp->mb[1]); in qla2x00_echo_test()
4832 return rval; in qla2x00_echo_test()
4838 int rval; in qla84xx_reset_chip() local
4851 rval = qla2x00_mailbox_command(vha, mcp); in qla84xx_reset_chip()
4853 if (rval != QLA_SUCCESS) in qla84xx_reset_chip()
4854 ql_dbg(ql_dbg_mbx, vha, 0x10fe, "Failed=%x.\n", rval); in qla84xx_reset_chip()
4859 return rval; in qla84xx_reset_chip()
4865 int rval; in qla2x00_write_ram_word() local
4884 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_write_ram_word()
4885 if (rval != QLA_SUCCESS) { in qla2x00_write_ram_word()
4887 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_write_ram_word()
4893 return rval; in qla2x00_write_ram_word()
4899 int rval; in qla81xx_write_mpi_register() local
4905 rval = QLA_SUCCESS; in qla81xx_write_mpi_register()
4943 rval = mb0 & MBS_MASK; in qla81xx_write_mpi_register()
4945 rval = QLA_FUNCTION_FAILED; in qla81xx_write_mpi_register()
4947 if (rval != QLA_SUCCESS) { in qla81xx_write_mpi_register()
4949 "Failed=%x mb[0]=%x.\n", rval, mb[0]); in qla81xx_write_mpi_register()
4955 return rval; in qla81xx_write_mpi_register()
4961 int rval; in qla2x00_get_data_rate() local
4980 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_get_data_rate()
4981 if (rval != QLA_SUCCESS) { in qla2x00_get_data_rate()
4983 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_get_data_rate()
4991 return rval; in qla2x00_get_data_rate()
4997 int rval; in qla81xx_get_port_config() local
5014 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_get_port_config()
5016 if (rval != QLA_SUCCESS) { in qla81xx_get_port_config()
5018 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_get_port_config()
5026 return rval; in qla81xx_get_port_config()
5032 int rval; in qla81xx_set_port_config() local
5046 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_set_port_config()
5048 if (rval != QLA_SUCCESS) { in qla81xx_set_port_config()
5050 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_set_port_config()
5055 return rval; in qla81xx_set_port_config()
5063 int rval; in qla24xx_set_fcp_prio() local
5086 rval = qla2x00_mailbox_command(vha, mcp); in qla24xx_set_fcp_prio()
5094 if (rval != QLA_SUCCESS) { in qla24xx_set_fcp_prio()
5095 ql_dbg(ql_dbg_mbx, vha, 0x10cd, "Failed=%x.\n", rval); in qla24xx_set_fcp_prio()
5101 return rval; in qla24xx_set_fcp_prio()
5107 int rval = QLA_FUNCTION_FAILED; in qla2x00_get_thermal_temp() local
5114 return rval; in qla2x00_get_thermal_temp()
5120 rval = qla2x00_read_sfp(vha, 0, &byte, in qla2x00_get_thermal_temp()
5123 return rval; in qla2x00_get_thermal_temp()
5127 rval = qla2x00_read_sfp(vha, 0, &byte, in qla2x00_get_thermal_temp()
5130 return rval; in qla2x00_get_thermal_temp()
5134 return rval; in qla2x00_get_thermal_temp()
5139 rval = QLA_SUCCESS; in qla2x00_get_thermal_temp()
5140 return rval; in qla2x00_get_thermal_temp()
5143 rval = QLA_SUCCESS; in qla2x00_get_thermal_temp()
5144 return rval; in qla2x00_get_thermal_temp()
5147 rval = qla2x00_read_asic_temperature(vha, temp); in qla2x00_get_thermal_temp()
5148 return rval; in qla2x00_get_thermal_temp()
5154 int rval; in qla82xx_mbx_intr_enable() local
5174 rval = qla2x00_mailbox_command(vha, mcp); in qla82xx_mbx_intr_enable()
5175 if (rval != QLA_SUCCESS) { in qla82xx_mbx_intr_enable()
5177 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_intr_enable()
5183 return rval; in qla82xx_mbx_intr_enable()
5189 int rval; in qla82xx_mbx_intr_disable() local
5209 rval = qla2x00_mailbox_command(vha, mcp); in qla82xx_mbx_intr_disable()
5210 if (rval != QLA_SUCCESS) { in qla82xx_mbx_intr_disable()
5212 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_intr_disable()
5218 return rval; in qla82xx_mbx_intr_disable()
5227 int rval = QLA_FUNCTION_FAILED; in qla82xx_md_get_template_size() local
5244 rval = qla2x00_mailbox_command(vha, mcp); in qla82xx_md_get_template_size()
5247 if (rval != QLA_SUCCESS) { in qla82xx_md_get_template_size()
5259 rval = QLA_FUNCTION_FAILED; in qla82xx_md_get_template_size()
5262 return rval; in qla82xx_md_get_template_size()
5271 int rval = QLA_FUNCTION_FAILED; in qla82xx_md_get_template() local
5281 return rval; in qla82xx_md_get_template()
5301 rval = qla2x00_mailbox_command(vha, mcp); in qla82xx_md_get_template()
5303 if (rval != QLA_SUCCESS) { in qla82xx_md_get_template()
5311 return rval; in qla82xx_md_get_template()
5320 int rval = QLA_FUNCTION_FAILED; in qla8044_md_get_template() local
5330 return rval; in qla8044_md_get_template()
5352 rval = qla2x00_mailbox_command(vha, mcp); in qla8044_md_get_template()
5354 if (rval != QLA_SUCCESS) { in qla8044_md_get_template()
5359 return rval; in qla8044_md_get_template()
5365 return rval; in qla8044_md_get_template()
5371 int rval; in qla81xx_set_led_config() local
5400 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_set_led_config()
5401 if (rval != QLA_SUCCESS) { in qla81xx_set_led_config()
5403 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_set_led_config()
5409 return rval; in qla81xx_set_led_config()
5415 int rval; in qla81xx_get_led_config() local
5436 rval = qla2x00_mailbox_command(vha, mcp); in qla81xx_get_led_config()
5437 if (rval != QLA_SUCCESS) { in qla81xx_get_led_config()
5439 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla81xx_get_led_config()
5453 return rval; in qla81xx_get_led_config()
5459 int rval; in qla82xx_mbx_beacon_ctl() local
5482 rval = qla2x00_mailbox_command(vha, mcp); in qla82xx_mbx_beacon_ctl()
5483 if (rval != QLA_SUCCESS) { in qla82xx_mbx_beacon_ctl()
5485 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla82xx_mbx_beacon_ctl()
5491 return rval; in qla82xx_mbx_beacon_ctl()
5497 int rval; in qla83xx_wr_reg() local
5518 rval = qla2x00_mailbox_command(vha, mcp); in qla83xx_wr_reg()
5520 if (rval != QLA_SUCCESS) { in qla83xx_wr_reg()
5522 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla83xx_wr_reg()
5528 return rval; in qla83xx_wr_reg()
5534 int rval; in qla2x00_port_logout() local
5557 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_port_logout()
5558 if (rval != QLA_SUCCESS) in qla2x00_port_logout()
5560 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_port_logout()
5565 return rval; in qla2x00_port_logout()
5571 int rval; in qla83xx_rd_reg() local
5590 rval = qla2x00_mailbox_command(vha, mcp); in qla83xx_rd_reg()
5592 if (rval != QLA_SUCCESS) { in qla83xx_rd_reg()
5595 rval, mcp->mb[0], mcp->mb[1]); in qla83xx_rd_reg()
5616 return rval; in qla83xx_rd_reg()
5622 int rval; in qla83xx_restart_nic_firmware() local
5637 rval = qla2x00_mailbox_command(vha, mcp); in qla83xx_restart_nic_firmware()
5639 if (rval != QLA_SUCCESS) { in qla83xx_restart_nic_firmware()
5642 rval, mcp->mb[0], mcp->mb[1]); in qla83xx_restart_nic_firmware()
5648 return rval; in qla83xx_restart_nic_firmware()
5655 int rval; in qla83xx_access_control() local
5681 rval = qla2x00_mailbox_command(vha, mcp); in qla83xx_access_control()
5683 if (rval != QLA_SUCCESS) { in qla83xx_access_control()
5686 rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3], in qla83xx_access_control()
5702 return rval; in qla83xx_access_control()
5709 int rval; in qla2x00_dump_mctp_data() local
5739 rval = qla2x00_mailbox_command(vha, mcp); in qla2x00_dump_mctp_data()
5741 if (rval != QLA_SUCCESS) { in qla2x00_dump_mctp_data()
5743 "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); in qla2x00_dump_mctp_data()
5749 return rval; in qla2x00_dump_mctp_data()
5756 int rval; in qla26xx_dport_diagnostics() local
5788 rval = qla2x00_mailbox_command(vha, mcp); in qla26xx_dport_diagnostics()
5790 if (rval != QLA_SUCCESS) { in qla26xx_dport_diagnostics()
5791 ql_dbg(ql_dbg_mbx, vha, 0x1195, "Failed=%x.\n", rval); in qla26xx_dport_diagnostics()
5800 return rval; in qla26xx_dport_diagnostics()