Lines Matching refs:dcmd
1828 struct megasas_dcmd_frame *dcmd; in megasas_get_ld_vf_affiliation_111() local
1843 dcmd = &cmd->frame->dcmd; in megasas_get_ld_vf_affiliation_111()
1871 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_get_ld_vf_affiliation_111()
1873 dcmd->cmd = MFI_CMD_DCMD; in megasas_get_ld_vf_affiliation_111()
1874 dcmd->cmd_status = 0xFF; in megasas_get_ld_vf_affiliation_111()
1875 dcmd->sge_count = 1; in megasas_get_ld_vf_affiliation_111()
1876 dcmd->flags = MFI_FRAME_DIR_BOTH; in megasas_get_ld_vf_affiliation_111()
1877 dcmd->timeout = 0; in megasas_get_ld_vf_affiliation_111()
1878 dcmd->pad_0 = 0; in megasas_get_ld_vf_affiliation_111()
1879 dcmd->data_xfer_len = sizeof(struct MR_LD_VF_AFFILIATION_111); in megasas_get_ld_vf_affiliation_111()
1880 dcmd->opcode = MR_DCMD_LD_VF_MAP_GET_ALL_LDS_111; in megasas_get_ld_vf_affiliation_111()
1883 dcmd->sgl.sge32[0].phys_addr = in megasas_get_ld_vf_affiliation_111()
1886 dcmd->sgl.sge32[0].phys_addr = new_affiliation_111_h; in megasas_get_ld_vf_affiliation_111()
1888 dcmd->sgl.sge32[0].length = in megasas_get_ld_vf_affiliation_111()
1896 if (dcmd->cmd_status) { in megasas_get_ld_vf_affiliation_111()
1899 dcmd->cmd_status, instance->host->host_no); in megasas_get_ld_vf_affiliation_111()
1941 struct megasas_dcmd_frame *dcmd; in megasas_get_ld_vf_affiliation_12() local
1957 dcmd = &cmd->frame->dcmd; in megasas_get_ld_vf_affiliation_12()
1986 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_get_ld_vf_affiliation_12()
1988 dcmd->cmd = MFI_CMD_DCMD; in megasas_get_ld_vf_affiliation_12()
1989 dcmd->cmd_status = 0xFF; in megasas_get_ld_vf_affiliation_12()
1990 dcmd->sge_count = 1; in megasas_get_ld_vf_affiliation_12()
1991 dcmd->flags = MFI_FRAME_DIR_BOTH; in megasas_get_ld_vf_affiliation_12()
1992 dcmd->timeout = 0; in megasas_get_ld_vf_affiliation_12()
1993 dcmd->pad_0 = 0; in megasas_get_ld_vf_affiliation_12()
1994 dcmd->data_xfer_len = (MAX_LOGICAL_DRIVES + 1) * in megasas_get_ld_vf_affiliation_12()
1996 dcmd->opcode = MR_DCMD_LD_VF_MAP_GET_ALL_LDS; in megasas_get_ld_vf_affiliation_12()
1999 dcmd->sgl.sge32[0].phys_addr = instance->vf_affiliation_h; in megasas_get_ld_vf_affiliation_12()
2001 dcmd->sgl.sge32[0].phys_addr = new_affiliation_h; in megasas_get_ld_vf_affiliation_12()
2003 dcmd->sgl.sge32[0].length = (MAX_LOGICAL_DRIVES + 1) * in megasas_get_ld_vf_affiliation_12()
2011 if (dcmd->cmd_status) { in megasas_get_ld_vf_affiliation_12()
2014 dcmd->cmd_status, instance->host->host_no); in megasas_get_ld_vf_affiliation_12()
2126 struct megasas_dcmd_frame *dcmd; in megasas_sriov_start_heartbeat() local
2138 dcmd = &cmd->frame->dcmd; in megasas_sriov_start_heartbeat()
2154 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_sriov_start_heartbeat()
2156 dcmd->mbox.s[0] = sizeof(struct MR_CTRL_HB_HOST_MEM); in megasas_sriov_start_heartbeat()
2157 dcmd->cmd = MFI_CMD_DCMD; in megasas_sriov_start_heartbeat()
2158 dcmd->cmd_status = 0xFF; in megasas_sriov_start_heartbeat()
2159 dcmd->sge_count = 1; in megasas_sriov_start_heartbeat()
2160 dcmd->flags = MFI_FRAME_DIR_BOTH; in megasas_sriov_start_heartbeat()
2161 dcmd->timeout = 0; in megasas_sriov_start_heartbeat()
2162 dcmd->pad_0 = 0; in megasas_sriov_start_heartbeat()
2163 dcmd->data_xfer_len = sizeof(struct MR_CTRL_HB_HOST_MEM); in megasas_sriov_start_heartbeat()
2164 dcmd->opcode = MR_DCMD_CTRL_SHARED_HOST_MEM_ALLOC; in megasas_sriov_start_heartbeat()
2165 dcmd->sgl.sge32[0].phys_addr = instance->hb_host_mem_h; in megasas_sriov_start_heartbeat()
2166 dcmd->sgl.sge32[0].length = sizeof(struct MR_CTRL_HB_HOST_MEM); in megasas_sriov_start_heartbeat()
2182 if (dcmd->cmd_status) { in megasas_sriov_start_heartbeat()
2185 dcmd->cmd_status, in megasas_sriov_start_heartbeat()
2931 opcode = le32_to_cpu(cmd->frame->dcmd.opcode); in megasas_complete_cmd()
2934 && (cmd->frame->dcmd.mbox.b[1] == 1)) { in megasas_complete_cmd()
3765 struct megasas_dcmd_frame *dcmd; in megasas_get_pd_list() local
3777 dcmd = &cmd->frame->dcmd; in megasas_get_pd_list()
3789 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_get_pd_list()
3791 dcmd->mbox.b[0] = MR_PD_QUERY_TYPE_EXPOSED_TO_HOST; in megasas_get_pd_list()
3792 dcmd->mbox.b[1] = 0; in megasas_get_pd_list()
3793 dcmd->cmd = MFI_CMD_DCMD; in megasas_get_pd_list()
3794 dcmd->cmd_status = 0xFF; in megasas_get_pd_list()
3795 dcmd->sge_count = 1; in megasas_get_pd_list()
3796 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_READ); in megasas_get_pd_list()
3797 dcmd->timeout = 0; in megasas_get_pd_list()
3798 dcmd->pad_0 = 0; in megasas_get_pd_list()
3799 dcmd->data_xfer_len = cpu_to_le32(MEGASAS_MAX_PD * sizeof(struct MR_PD_LIST)); in megasas_get_pd_list()
3800 dcmd->opcode = cpu_to_le32(MR_DCMD_PD_LIST_QUERY); in megasas_get_pd_list()
3801 dcmd->sgl.sge32[0].phys_addr = cpu_to_le32(ci_h); in megasas_get_pd_list()
3802 dcmd->sgl.sge32[0].length = cpu_to_le32(MEGASAS_MAX_PD * sizeof(struct MR_PD_LIST)); in megasas_get_pd_list()
3864 struct megasas_dcmd_frame *dcmd; in megasas_get_ld_list() local
3876 dcmd = &cmd->frame->dcmd; in megasas_get_ld_list()
3889 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_get_ld_list()
3892 dcmd->mbox.b[0] = 1; in megasas_get_ld_list()
3893 dcmd->cmd = MFI_CMD_DCMD; in megasas_get_ld_list()
3894 dcmd->cmd_status = 0xFF; in megasas_get_ld_list()
3895 dcmd->sge_count = 1; in megasas_get_ld_list()
3896 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_READ); in megasas_get_ld_list()
3897 dcmd->timeout = 0; in megasas_get_ld_list()
3898 dcmd->data_xfer_len = cpu_to_le32(sizeof(struct MR_LD_LIST)); in megasas_get_ld_list()
3899 dcmd->opcode = cpu_to_le32(MR_DCMD_LD_GET_LIST); in megasas_get_ld_list()
3900 dcmd->sgl.sge32[0].phys_addr = cpu_to_le32(ci_h); in megasas_get_ld_list()
3901 dcmd->sgl.sge32[0].length = cpu_to_le32(sizeof(struct MR_LD_LIST)); in megasas_get_ld_list()
3902 dcmd->pad_0 = 0; in megasas_get_ld_list()
3954 struct megasas_dcmd_frame *dcmd; in megasas_ld_list_query() local
3967 dcmd = &cmd->frame->dcmd; in megasas_ld_list_query()
3980 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_ld_list_query()
3982 dcmd->mbox.b[0] = query_type; in megasas_ld_list_query()
3984 dcmd->mbox.b[2] = 1; in megasas_ld_list_query()
3986 dcmd->cmd = MFI_CMD_DCMD; in megasas_ld_list_query()
3987 dcmd->cmd_status = 0xFF; in megasas_ld_list_query()
3988 dcmd->sge_count = 1; in megasas_ld_list_query()
3989 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_READ); in megasas_ld_list_query()
3990 dcmd->timeout = 0; in megasas_ld_list_query()
3991 dcmd->data_xfer_len = cpu_to_le32(sizeof(struct MR_LD_TARGETID_LIST)); in megasas_ld_list_query()
3992 dcmd->opcode = cpu_to_le32(MR_DCMD_LD_LIST_QUERY); in megasas_ld_list_query()
3993 dcmd->sgl.sge32[0].phys_addr = cpu_to_le32(ci_h); in megasas_ld_list_query()
3994 dcmd->sgl.sge32[0].length = cpu_to_le32(sizeof(struct MR_LD_TARGETID_LIST)); in megasas_ld_list_query()
3995 dcmd->pad_0 = 0; in megasas_ld_list_query()
4041 struct megasas_dcmd_frame *dcmd; in megasas_get_ctrl_info() local
4052 dcmd = &cmd->frame->dcmd; in megasas_get_ctrl_info()
4064 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_get_ctrl_info()
4066 dcmd->cmd = MFI_CMD_DCMD; in megasas_get_ctrl_info()
4067 dcmd->cmd_status = 0xFF; in megasas_get_ctrl_info()
4068 dcmd->sge_count = 1; in megasas_get_ctrl_info()
4069 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_READ); in megasas_get_ctrl_info()
4070 dcmd->timeout = 0; in megasas_get_ctrl_info()
4071 dcmd->pad_0 = 0; in megasas_get_ctrl_info()
4072 dcmd->data_xfer_len = cpu_to_le32(sizeof(struct megasas_ctrl_info)); in megasas_get_ctrl_info()
4073 dcmd->opcode = cpu_to_le32(MR_DCMD_CTRL_GET_INFO); in megasas_get_ctrl_info()
4074 dcmd->sgl.sge32[0].phys_addr = cpu_to_le32(ci_h); in megasas_get_ctrl_info()
4075 dcmd->sgl.sge32[0].length = cpu_to_le32(sizeof(struct megasas_ctrl_info)); in megasas_get_ctrl_info()
4076 dcmd->mbox.b[0] = 1; in megasas_get_ctrl_info()
4118 struct megasas_dcmd_frame *dcmd; in megasas_set_crash_dump_params() local
4128 dcmd = &cmd->frame->dcmd; in megasas_set_crash_dump_params()
4130 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_set_crash_dump_params()
4131 dcmd->mbox.b[0] = crash_buf_state; in megasas_set_crash_dump_params()
4132 dcmd->cmd = MFI_CMD_DCMD; in megasas_set_crash_dump_params()
4133 dcmd->cmd_status = 0xFF; in megasas_set_crash_dump_params()
4134 dcmd->sge_count = 1; in megasas_set_crash_dump_params()
4135 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_NONE); in megasas_set_crash_dump_params()
4136 dcmd->timeout = 0; in megasas_set_crash_dump_params()
4137 dcmd->pad_0 = 0; in megasas_set_crash_dump_params()
4138 dcmd->data_xfer_len = cpu_to_le32(CRASH_DMA_BUF_SIZE); in megasas_set_crash_dump_params()
4139 dcmd->opcode = cpu_to_le32(MR_DCMD_CTRL_SET_CRASH_DUMP_PARAMS); in megasas_set_crash_dump_params()
4140 dcmd->sgl.sge32[0].phys_addr = cpu_to_le32(instance->crash_dump_h); in megasas_set_crash_dump_params()
4141 dcmd->sgl.sge32[0].length = cpu_to_le32(CRASH_DMA_BUF_SIZE); in megasas_set_crash_dump_params()
4672 struct megasas_dcmd_frame *dcmd; in megasas_get_seq_num() local
4682 dcmd = &cmd->frame->dcmd; in megasas_get_seq_num()
4693 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_get_seq_num()
4695 dcmd->cmd = MFI_CMD_DCMD; in megasas_get_seq_num()
4696 dcmd->cmd_status = 0x0; in megasas_get_seq_num()
4697 dcmd->sge_count = 1; in megasas_get_seq_num()
4698 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_READ); in megasas_get_seq_num()
4699 dcmd->timeout = 0; in megasas_get_seq_num()
4700 dcmd->pad_0 = 0; in megasas_get_seq_num()
4701 dcmd->data_xfer_len = cpu_to_le32(sizeof(struct megasas_evt_log_info)); in megasas_get_seq_num()
4702 dcmd->opcode = cpu_to_le32(MR_DCMD_CTRL_EVENT_GET_INFO); in megasas_get_seq_num()
4703 dcmd->sgl.sge32[0].phys_addr = cpu_to_le32(el_info_h); in megasas_get_seq_num()
4704 dcmd->sgl.sge32[0].length = cpu_to_le32(sizeof(struct megasas_evt_log_info)); in megasas_get_seq_num()
4747 struct megasas_dcmd_frame *dcmd; in megasas_register_aen() local
4768 prev_aen.word = instance->aen_cmd->frame->dcmd.mbox.w[1]; in megasas_register_aen()
4813 dcmd = &cmd->frame->dcmd; in megasas_register_aen()
4820 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_register_aen()
4822 dcmd->cmd = MFI_CMD_DCMD; in megasas_register_aen()
4823 dcmd->cmd_status = 0x0; in megasas_register_aen()
4824 dcmd->sge_count = 1; in megasas_register_aen()
4825 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_READ); in megasas_register_aen()
4826 dcmd->timeout = 0; in megasas_register_aen()
4827 dcmd->pad_0 = 0; in megasas_register_aen()
4828 dcmd->data_xfer_len = cpu_to_le32(sizeof(struct megasas_evt_detail)); in megasas_register_aen()
4829 dcmd->opcode = cpu_to_le32(MR_DCMD_CTRL_EVENT_WAIT); in megasas_register_aen()
4830 dcmd->mbox.w[0] = cpu_to_le32(seq_num); in megasas_register_aen()
4832 dcmd->mbox.w[1] = cpu_to_le32(curr_aen.word); in megasas_register_aen()
4833 dcmd->sgl.sge32[0].phys_addr = cpu_to_le32(instance->evt_detail_h); in megasas_register_aen()
4834 dcmd->sgl.sge32[0].length = cpu_to_le32(sizeof(struct megasas_evt_detail)); in megasas_register_aen()
5357 struct megasas_dcmd_frame *dcmd; in megasas_flush_cache() local
5367 dcmd = &cmd->frame->dcmd; in megasas_flush_cache()
5369 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_flush_cache()
5371 dcmd->cmd = MFI_CMD_DCMD; in megasas_flush_cache()
5372 dcmd->cmd_status = 0x0; in megasas_flush_cache()
5373 dcmd->sge_count = 0; in megasas_flush_cache()
5374 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_NONE); in megasas_flush_cache()
5375 dcmd->timeout = 0; in megasas_flush_cache()
5376 dcmd->pad_0 = 0; in megasas_flush_cache()
5377 dcmd->data_xfer_len = 0; in megasas_flush_cache()
5378 dcmd->opcode = cpu_to_le32(MR_DCMD_CTRL_CACHE_FLUSH); in megasas_flush_cache()
5379 dcmd->mbox.b[0] = MR_FLUSH_CTRL_CACHE | MR_FLUSH_DISK_CACHE; in megasas_flush_cache()
5403 struct megasas_dcmd_frame *dcmd; in megasas_shutdown_controller() local
5419 dcmd = &cmd->frame->dcmd; in megasas_shutdown_controller()
5421 memset(dcmd->mbox.b, 0, MFI_MBOX_SIZE); in megasas_shutdown_controller()
5423 dcmd->cmd = MFI_CMD_DCMD; in megasas_shutdown_controller()
5424 dcmd->cmd_status = 0x0; in megasas_shutdown_controller()
5425 dcmd->sge_count = 0; in megasas_shutdown_controller()
5426 dcmd->flags = cpu_to_le16(MFI_FRAME_DIR_NONE); in megasas_shutdown_controller()
5427 dcmd->timeout = 0; in megasas_shutdown_controller()
5428 dcmd->pad_0 = 0; in megasas_shutdown_controller()
5429 dcmd->data_xfer_len = 0; in megasas_shutdown_controller()
5430 dcmd->opcode = cpu_to_le32(opcode); in megasas_shutdown_controller()
5904 crash_support = cmd->frame->dcmd.mbox.w[0]; in megasas_set_crash_dump_params_ioctl()
5976 if (cmd->frame->dcmd.opcode == MR_DRIVER_SET_APP_CRASHDUMP_MODE) { in megasas_mgmt_fw_ioctl()