提交 c77a9bd8 编写于 作者: A adam radford 提交者: James Bottomley

[SCSI] megaraid_sas: Fix megasas_ioc_init_fusion

The following patch for megaraid_sas fixes the megasas_ioc_init_fusion
function to use a local stack variable for the IOCinit frame physical address
instead of clobbering the first request descriptor.
Signed-off-by: NAdam Radford <aradford@gmail.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 26a077e7
...@@ -585,7 +585,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) ...@@ -585,7 +585,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
struct megasas_cmd *cmd; struct megasas_cmd *cmd;
u8 ret; u8 ret;
struct fusion_context *fusion; struct fusion_context *fusion;
union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc; union MEGASAS_REQUEST_DESCRIPTOR_UNION req_desc;
int i; int i;
struct megasas_header *frame_hdr; struct megasas_header *frame_hdr;
...@@ -650,15 +650,12 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) ...@@ -650,15 +650,12 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
cpu_to_le32(lower_32_bits(ioc_init_handle)); cpu_to_le32(lower_32_bits(ioc_init_handle));
init_frame->data_xfer_len = cpu_to_le32(sizeof(struct MPI2_IOC_INIT_REQUEST)); init_frame->data_xfer_len = cpu_to_le32(sizeof(struct MPI2_IOC_INIT_REQUEST));
req_desc = req_desc.Words = 0;
(union MEGASAS_REQUEST_DESCRIPTOR_UNION *)fusion->req_frames_desc; req_desc.MFAIo.RequestFlags =
req_desc->Words = 0;
req_desc->MFAIo.RequestFlags =
(MEGASAS_REQ_DESCRIPT_FLAGS_MFA << (MEGASAS_REQ_DESCRIPT_FLAGS_MFA <<
MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
cpu_to_le32s((u32 *)&req_desc->MFAIo); cpu_to_le32s((u32 *)&req_desc.MFAIo);
req_desc->Words |= cpu_to_le64(cmd->frame_phys_addr); req_desc.Words |= cpu_to_le64(cmd->frame_phys_addr);
/* /*
* disable the intr before firing the init frame * disable the intr before firing the init frame
...@@ -672,8 +669,8 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) ...@@ -672,8 +669,8 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
break; break;
} }
instance->instancet->fire_cmd(instance, req_desc->u.low, instance->instancet->fire_cmd(instance, req_desc.u.low,
req_desc->u.high, instance->reg_set); req_desc.u.high, instance->reg_set);
wait_and_poll(instance, cmd); wait_and_poll(instance, cmd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册