2 * linux/drivers/message/fusion/isense.c
3 * Little linux driver / shim that interfaces with the Fusion MPT
4 * Linux base driver to provide english readable strings in SCSI
5 * Error Report logging output. This module implements SCSI-3
6 * Opcode lookup and a sorted table of SCSI-3 ASC/ASCQ strings.
8 * Copyright (c) 1991-2004 Steven J. Ralston
9 * Written By: Steven J. Ralston
10 * (yes I wrote some of the orig. code back in 1991!)
11 * (mailto:sjralston1@netscape.net)
12 * (mailto:mpt_linux_developer@lsil.com)
14 * $Id: isense.c,v 1.33 2002/02/27 18:44:19 sralston Exp $
16 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
18 This program is free software; you can redistribute it and/or modify
19 it under the terms of the GNU General Public License as published by
20 the Free Software Foundation; version 2 of the License.
22 This program is distributed in the hope that it will be useful,
23 but WITHOUT ANY WARRANTY; without even the implied warranty of
24 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 GNU General Public License for more details.
28 THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
29 CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
30 LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
31 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
32 solely responsible for determining the appropriateness of using and
33 distributing the Program and assumes all risks associated with its
34 exercise of rights under this Agreement, including but not limited to
35 the risks and costs of program errors, damage to or loss of data,
36 programs or equipment, and unavailability or interruption of operations.
38 DISCLAIMER OF LIABILITY
39 NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
40 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
41 DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
42 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
43 TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
44 USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
45 HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
47 You should have received a copy of the GNU General Public License
48 along with this program; if not, write to the Free Software
49 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
51 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
53 #include <linux/version.h>
54 #include <linux/kernel.h>
55 #include <linux/module.h>
56 #include <linux/errno.h>
57 #include <linux/init.h>
60 #define MODULEAUTHOR "Steven J. Ralston"
61 #define COPYRIGHT "Copyright (c) 2001-2004 " MODULEAUTHOR
66 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
72 * YIKES! I don't usually #include C source files, but..
73 * The following #include's pulls in our needed ASCQ_Table[] array,
74 * ASCQ_TableSz integer, and ScsiOpcodeString[] array!
79 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
80 #define my_NAME "SCSI-3 Opcodes & ASC/ASCQ Strings"
81 #define my_VERSION MPT_LINUX_VERSION_COMMON
82 #define MYNAM "isense"
84 MODULE_AUTHOR(MODULEAUTHOR);
85 MODULE_DESCRIPTION(my_NAME);
86 MODULE_LICENSE("GPL");
88 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
89 int __init isense_init(void)
91 show_mptmod_ver(my_NAME, my_VERSION);
96 if (mpt_register_ascqops_strings(&ASCQ_Table[0], ASCQ_TableSize, ScsiOpcodeString) != 1)
98 printk(KERN_ERR MYNAM ": ERROR: Can't register with Fusion MPT base driver!\n");
101 printk(KERN_INFO MYNAM ": Registered SCSI-3 Opcodes & ASC/ASCQ Strings\n");
106 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
107 static void isense_exit(void)
110 mpt_deregister_ascqops_strings();
112 printk(KERN_INFO MYNAM ": Deregistered SCSI-3 Opcodes & ASC/ASCQ Strings\n");
115 module_init(isense_init);
116 module_exit(isense_exit);
118 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/