diff options
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
| -rw-r--r-- | drivers/message/fusion/mptctl.c | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index a3856ed90ae..8a050e88568 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c @@ -978,7 +978,7 @@ retry_wait:  	ReplyMsg = (pFWDownloadReply_t)iocp->ioctl_cmds.reply;  	iocstat = le16_to_cpu(ReplyMsg->IOCStatus) & MPI_IOCSTATUS_MASK;  	if (iocstat == MPI_IOCSTATUS_SUCCESS) { -		printk(MYIOC_s_INFO_FMT "F/W update successfull!\n", iocp->name); +		printk(MYIOC_s_INFO_FMT "F/W update successful!\n", iocp->name);  		return 0;  	} else if (iocstat == MPI_IOCSTATUS_INVALID_FUNCTION) {  		printk(MYIOC_s_WARN_FMT "Hmmm...  F/W download not supported!?!\n", @@ -1243,7 +1243,6 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)  	int			iocnum;  	unsigned int		port;  	int			cim_rev; -	u8			revision;  	struct scsi_device 	*sdev;  	VirtDevice		*vdevice; @@ -1307,16 +1306,17 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)  	else  		karg->adapterType = MPT_IOCTL_INTERFACE_SCSI; -	if (karg->hdr.port > 1) +	if (karg->hdr.port > 1) { +		kfree(karg);  		return -EINVAL; +	}  	port = karg->hdr.port;  	karg->port = port;  	pdev = (struct pci_dev *) ioc->pcidev;  	karg->pciId = pdev->device; -	pci_read_config_byte(pdev, PCI_CLASS_REVISION, &revision); -	karg->hwRev = revision; +	karg->hwRev = pdev->revision;  	karg->subSystemDevice = pdev->subsystem_device;  	karg->subSystemVendor = pdev->subsystem_vendor; @@ -2398,7 +2398,7 @@ done_free_mem:  	}  	/* mf is null if command issued successfully -	 * otherwise, failure occured after mf acquired. +	 * otherwise, failure occurred after mf acquired.  	 */  	if (mf)  		mpt_free_msg_frame(ioc, mf); @@ -2432,9 +2432,9 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)  	int			rc, cim_rev;  	ToolboxIstwiReadWriteRequest_t	*IstwiRWRequest;  	MPT_FRAME_HDR		*mf = NULL; -	MPIHeader_t		*mpi_hdr;  	unsigned long		timeleft;  	int			retval; +	u32			msgcontext;  	/* Reset long to int. Should affect IA64 and SPARC only  	 */ @@ -2581,11 +2581,11 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)  	}  	IstwiRWRequest = (ToolboxIstwiReadWriteRequest_t *)mf; -	mpi_hdr = (MPIHeader_t *) mf; +	msgcontext = IstwiRWRequest->MsgContext;  	memset(IstwiRWRequest,0,sizeof(ToolboxIstwiReadWriteRequest_t)); +	IstwiRWRequest->MsgContext = msgcontext;  	IstwiRWRequest->Function = MPI_FUNCTION_TOOLBOX;  	IstwiRWRequest->Tool = MPI_TOOLBOX_ISTWI_READ_WRITE_TOOL; -	IstwiRWRequest->MsgContext = mpi_hdr->MsgContext;  	IstwiRWRequest->Flags = MPI_TB_ISTWI_FLAGS_READ;  	IstwiRWRequest->NumAddressBytes = 0x01;  	IstwiRWRequest->DataLength = cpu_to_le16(0x04);  | 
