aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
-rw-r--r--drivers/message/fusion/mptctl.c46
1 files changed, 9 insertions, 37 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index 70b0cfb5ac5c..7f9a87757df3 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -1,40 +1,12 @@
1/* 1/*
2 * linux/drivers/message/fusion/mptctl.c 2 * linux/drivers/message/fusion/mptctl.c
3 * Fusion MPT misc device (ioctl) driver. 3 * mpt Ioctl driver.
4 * For use with PCI chip/adapter(s): 4 * For use with LSI Logic PCI chip/adapters
5 * LSIFC9xx/LSI409xx Fibre Channel
6 * running LSI Logic Fusion MPT (Message Passing Technology) firmware. 5 * running LSI Logic Fusion MPT (Message Passing Technology) firmware.
7 * 6 *
8 * Credits: 7 * Copyright (c) 1999-2005 LSI Logic Corporation
9 * This driver would not exist if not for Alan Cox's development
10 * of the linux i2o driver.
11 *
12 * A special thanks to Pamela Delaney (LSI Logic) for tons of work
13 * and countless enhancements while adding support for the 1030
14 * chip family. Pam has been instrumental in the development of
15 * of the 2.xx.xx series fusion drivers, and her contributions are
16 * far too numerous to hope to list in one place.
17 *
18 * A huge debt of gratitude is owed to David S. Miller (DaveM)
19 * for fixing much of the stupid and broken stuff in the early
20 * driver while porting to sparc64 platform. THANK YOU!
21 *
22 * A big THANKS to Eddie C. Dost for fixing the ioctl path
23 * and most importantly f/w download on sparc64 platform!
24 * (plus Eddie's other helpful hints and insights)
25 *
26 * Thanks to Arnaldo Carvalho de Melo for finding and patching
27 * a potential memory leak in mptctl_do_fw_download(),
28 * and for some kmalloc insight:-)
29 *
30 * (see also mptbase.c)
31 *
32 * Copyright (c) 1999-2004 LSI Logic Corporation
33 * Originally By: Steven J. Ralston, Noah Romer
34 * (mailto:sjralston1@netscape.net)
35 * (mailto:mpt_linux_developer@lsil.com) 8 * (mailto:mpt_linux_developer@lsil.com)
36 * 9 *
37 * $Id: mptctl.c,v 1.63 2002/12/03 21:26:33 pdelaney Exp $
38 */ 10 */
39/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 11/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
40/* 12/*
@@ -95,8 +67,8 @@
95#include <scsi/scsi_host.h> 67#include <scsi/scsi_host.h>
96#include <scsi/scsi_tcq.h> 68#include <scsi/scsi_tcq.h>
97 69
98#define COPYRIGHT "Copyright (c) 1999-2004 LSI Logic Corporation" 70#define COPYRIGHT "Copyright (c) 1999-2005 LSI Logic Corporation"
99#define MODULEAUTHOR "Steven J. Ralston, Noah Romer, Pamela Delaney" 71#define MODULEAUTHOR "LSI Logic Corporation"
100#include "mptbase.h" 72#include "mptbase.h"
101#include "mptctl.h" 73#include "mptctl.h"
102 74
@@ -1119,7 +1091,7 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
1119 int numDevices = 0; 1091 int numDevices = 0;
1120 unsigned int max_id; 1092 unsigned int max_id;
1121 int ii; 1093 int ii;
1122 int port; 1094 unsigned int port;
1123 int cim_rev; 1095 int cim_rev;
1124 u8 revision; 1096 u8 revision;
1125 1097
@@ -1162,9 +1134,7 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
1162 return -ENODEV; 1134 return -ENODEV;
1163 } 1135 }
1164 1136
1165 /* Verify the data transfer size is correct. 1137 /* Verify the data transfer size is correct. */
1166 * Ignore the port setting.
1167 */
1168 if (karg->hdr.maxDataSize != data_size) { 1138 if (karg->hdr.maxDataSize != data_size) {
1169 printk(KERN_ERR "%s@%d::mptctl_getiocinfo - " 1139 printk(KERN_ERR "%s@%d::mptctl_getiocinfo - "
1170 "Structure size mismatch. Command not completed.\n", 1140 "Structure size mismatch. Command not completed.\n",
@@ -1181,6 +1151,8 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size)
1181 else 1151 else
1182 karg->adapterType = MPT_IOCTL_INTERFACE_SCSI; 1152 karg->adapterType = MPT_IOCTL_INTERFACE_SCSI;
1183 1153
1154 if (karg->hdr.port > 1)
1155 return -EINVAL;
1184 port = karg->hdr.port; 1156 port = karg->hdr.port;
1185 1157
1186 karg->port = port; 1158 karg->port = port;