diff options
author | adam radford <aradford@gmail.com> | 2014-03-10 13:51:36 +0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-03-15 21:19:21 +0400 |
commit | c77a9bd8e05d877d9b99b77a14e0062a1c808b6c (patch) | |
tree | 09509d4484595b5982cd1d73308195ab7ff0fe69 /drivers/scsi/megaraid/megaraid_sas_fusion.c | |
parent | 26a077e7a6b471926da3a70b7fb212758463f589 (diff) | |
download | linux-c77a9bd8e05d877d9b99b77a14e0062a1c808b6c.tar.xz |
[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: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_fusion.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_fusion.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 9c4b342b048c..f77715adf6bd 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -585,7 +585,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) struct megasas_cmd *cmd; u8 ret; struct fusion_context *fusion; - union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc; + union MEGASAS_REQUEST_DESCRIPTOR_UNION req_desc; int i; struct megasas_header *frame_hdr; @@ -650,15 +650,12 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) cpu_to_le32(lower_32_bits(ioc_init_handle)); init_frame->data_xfer_len = cpu_to_le32(sizeof(struct MPI2_IOC_INIT_REQUEST)); - req_desc = - (union MEGASAS_REQUEST_DESCRIPTOR_UNION *)fusion->req_frames_desc; - - req_desc->Words = 0; - req_desc->MFAIo.RequestFlags = + req_desc.Words = 0; + req_desc.MFAIo.RequestFlags = (MEGASAS_REQ_DESCRIPT_FLAGS_MFA << MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT); - cpu_to_le32s((u32 *)&req_desc->MFAIo); - req_desc->Words |= cpu_to_le64(cmd->frame_phys_addr); + cpu_to_le32s((u32 *)&req_desc.MFAIo); + req_desc.Words |= cpu_to_le64(cmd->frame_phys_addr); /* * disable the intr before firing the init frame @@ -672,8 +669,8 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) break; } - instance->instancet->fire_cmd(instance, req_desc->u.low, - req_desc->u.high, instance->reg_set); + instance->instancet->fire_cmd(instance, req_desc.u.low, + req_desc.u.high, instance->reg_set); wait_and_poll(instance, cmd); |