@@ -6866,6 +6866,7 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
6866
6866
void * sense = NULL ;
6867
6867
dma_addr_t sense_handle ;
6868
6868
unsigned long * sense_ptr ;
6869
+ u32 opcode ;
6869
6870
6870
6871
memset (kbuff_arr , 0 , sizeof (kbuff_arr ));
6871
6872
@@ -6893,15 +6894,16 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
6893
6894
cmd -> frame -> hdr .flags &= cpu_to_le16 (~(MFI_FRAME_IEEE |
6894
6895
MFI_FRAME_SGL64 |
6895
6896
MFI_FRAME_SENSE64 ));
6897
+ opcode = le32_to_cpu (cmd -> frame -> dcmd .opcode );
6896
6898
6897
- if (cmd -> frame -> dcmd . opcode == MR_DCMD_CTRL_SHUTDOWN ) {
6899
+ if (opcode == MR_DCMD_CTRL_SHUTDOWN ) {
6898
6900
if (megasas_get_ctrl_info (instance ) != DCMD_SUCCESS ) {
6899
6901
megasas_return_cmd (instance , cmd );
6900
6902
return -1 ;
6901
6903
}
6902
6904
}
6903
6905
6904
- if (cmd -> frame -> dcmd . opcode == MR_DRIVER_SET_APP_CRASHDUMP_MODE ) {
6906
+ if (opcode == MR_DRIVER_SET_APP_CRASHDUMP_MODE ) {
6905
6907
error = megasas_set_crash_dump_params_ioctl (cmd );
6906
6908
megasas_return_cmd (instance , cmd );
6907
6909
return error ;
@@ -6975,8 +6977,7 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
6975
6977
cmd -> sync_cmd = 0 ;
6976
6978
dev_err (& instance -> pdev -> dev ,
6977
6979
"return -EBUSY from %s %d opcode 0x%x cmd->cmd_status_drv 0x%x\n" ,
6978
- __func__ , __LINE__ , cmd -> frame -> dcmd .opcode ,
6979
- cmd -> cmd_status_drv );
6980
+ __func__ , __LINE__ , opcode , cmd -> cmd_status_drv );
6980
6981
return - EBUSY ;
6981
6982
}
6982
6983
0 commit comments