aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion
diff options
context:
space:
mode:
authorTomas Henzl <thenzl@redhat.com>2014-05-28 12:04:20 -0400
committerChristoph Hellwig <hch@lst.de>2014-05-28 12:14:16 -0400
commit73d02c200b0e43762eae7a81e7f36d14adb26a37 (patch)
tree56d6bb585010478c45033d1ccab4ec4b894f7f48 /drivers/message/fusion
parente6842f09aa3fb00616980e501c471ec9098c5d69 (diff)
mptfusion: fix msgContext in mptctl_hp_hostinfo
Hi, without this patch the istwiRWRequest->MsgContext is always set to zero, this patch saves the MsgContext in a msgcontext variable and then restores the value. Thanks to David Jeffery who found the issue and did the analysis. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Desai, Kashyap <Kashyap.Desai@lsi.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r--drivers/message/fusion/mptctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index dcc8385adeb3..8a050e885688 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -2432,9 +2432,9 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
2432 int rc, cim_rev; 2432 int rc, cim_rev;
2433 ToolboxIstwiReadWriteRequest_t *IstwiRWRequest; 2433 ToolboxIstwiReadWriteRequest_t *IstwiRWRequest;
2434 MPT_FRAME_HDR *mf = NULL; 2434 MPT_FRAME_HDR *mf = NULL;
2435 MPIHeader_t *mpi_hdr;
2436 unsigned long timeleft; 2435 unsigned long timeleft;
2437 int retval; 2436 int retval;
2437 u32 msgcontext;
2438 2438
2439 /* Reset long to int. Should affect IA64 and SPARC only 2439 /* Reset long to int. Should affect IA64 and SPARC only
2440 */ 2440 */
@@ -2581,11 +2581,11 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
2581 } 2581 }
2582 2582
2583 IstwiRWRequest = (ToolboxIstwiReadWriteRequest_t *)mf; 2583 IstwiRWRequest = (ToolboxIstwiReadWriteRequest_t *)mf;
2584 mpi_hdr = (MPIHeader_t *) mf; 2584 msgcontext = IstwiRWRequest->MsgContext;
2585 memset(IstwiRWRequest,0,sizeof(ToolboxIstwiReadWriteRequest_t)); 2585 memset(IstwiRWRequest,0,sizeof(ToolboxIstwiReadWriteRequest_t));
2586 IstwiRWRequest->MsgContext = msgcontext;
2586 IstwiRWRequest->Function = MPI_FUNCTION_TOOLBOX; 2587 IstwiRWRequest->Function = MPI_FUNCTION_TOOLBOX;
2587 IstwiRWRequest->Tool = MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL; 2588 IstwiRWRequest->Tool = MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL;
2588 IstwiRWRequest->MsgContext = mpi_hdr->MsgContext;
2589 IstwiRWRequest->Flags = MPI_TB_ISTWI_FLAGS_READ; 2589 IstwiRWRequest->Flags = MPI_TB_ISTWI_FLAGS_READ;
2590 IstwiRWRequest->NumAddressBytes = 0x01; 2590 IstwiRWRequest->NumAddressBytes = 0x01;
2591 IstwiRWRequest->DataLength = cpu_to_le16(0x04); 2591 IstwiRWRequest->DataLength = cpu_to_le16(0x04);