patch-2.2.6 linux/drivers/scsi/pci2220i.h

Next file: linux/drivers/scsi/psi240i.c
Previous file: linux/drivers/scsi/pci2220i.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.5/linux/drivers/scsi/pci2220i.h linux/drivers/scsi/pci2220i.h
@@ -1,33 +1,34 @@
-/*+M*************************************************************************
- * Perceptive Solutions, Inc. PCI-2000 device driver proc support for Linux.
+/****************************************************************************
+ * Perceptive Solutions, Inc. PCI-2220I device driver for Linux.
  *
- * Copyright (c) 1999 Perceptive Solutions, Inc.
+ * pci2220i.h - Linux Host Driver for PCI-2220i EIDE Adapters
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Copyright (c) 1997-1999 Perceptive Solutions, Inc.
+ * All Rights Reserved.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that redistributions of source
+ * code retain the above copyright notice and this comment without
+ * modification.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; see the file COPYING.  If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Technical updates and product information at:
+ *  http://www.psidisk.com
  *
+ * Please send questions, comments, bug reports to:
+ *  tech@psidisk.com Technical Support
  *
- *	File Name:		pci2220i.h
- *
- *	Description:	Header file for the SCSI driver for the PCI2220I
- *					EIDE interface card.
- *
- *-M*************************************************************************/
+ ****************************************************************************/
+#ifndef _PCI2220I_H
+#define _PCI2220I_H
 
 #ifndef	PSI_EIDE_SCSIOP
 #define	PSI_EIDE_SCSIOP	1
 
+#ifndef LINUX_VERSION_CODE
+#include <linux/version.h>
+#endif 
+#define	LINUXVERSION(v,p,s)    (((v)<<16) + ((p)<<8) + (s))
+
 /************************************************/
 /*		Some defines that we like 				*/
 /************************************************/
@@ -281,10 +282,11 @@
 
 // function prototypes
 int Pci2220i_Detect			(Scsi_Host_Template *tpnt);
-int Pci2220i_Command			(Scsi_Cmnd *SCpnt);
+int Pci2220i_Command		(Scsi_Cmnd *SCpnt);
 int Pci2220i_QueueCommand	(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *));
 int Pci2220i_Abort			(Scsi_Cmnd *SCpnt);
 int Pci2220i_Reset			(Scsi_Cmnd *SCpnt, unsigned int flags);
+int Pci2220i_Release		(struct Scsi_Host *pshost);
 int Pci2220i_BiosParam		(Disk *disk, kdev_t dev, int geom[]);
 
 #ifndef NULL
@@ -293,12 +295,43 @@
 
 extern struct proc_dir_entry Proc_Scsi_Pci2220i;
 
+#if LINUX_VERSION_CODE >= LINUXVERSION(2,1,75)
+#define PCI2220I {															\
+		next:						NULL,									\
+		module:						NULL,									\
+		proc_dir:					&Proc_Scsi_Pci2220i,					\
+		proc_info:					NULL,	/* let's not bloat the kernel */\
+		name:						"PCI-2220I EIDE Disk Controller",		\
+		detect:						Pci2220i_Detect,						\
+		release:					Pci2220i_Release,						\
+		info:						NULL,	/* let's not bloat the kernel */\
+		command:					Pci2220i_Command,						\
+		queuecommand:				Pci2220i_QueueCommand,					\
+		eh_strategy_handler:		NULL,									\
+		eh_abort_handler:			NULL,									\
+		eh_device_reset_handler:	NULL,									\
+		eh_bus_reset_handler:		NULL,									\
+		eh_host_reset_handler:		NULL,									\
+		abort:						Pci2220i_Abort,							\
+		reset:						Pci2220i_Reset,							\
+		slave_attach:				NULL,									\
+		bios_param:					Pci2220i_BiosParam,						\
+		can_queue:					1,										\
+		this_id:					-1,										\
+		sg_tablesize:				SG_NONE,								\
+		cmd_per_lun:				1,										\
+		present:					0,										\
+		unchecked_isa_dma:			0,										\
+		use_clustering:				DISABLE_CLUSTERING,						\
+		use_new_eh_code:			0										\
+		}
+#else
 #define PCI2220I { NULL, NULL,						\
 			&Proc_Scsi_Pci2220i,/* proc_dir_entry */\
 			NULL,		                			\
 			"PCI-2220I EIDE Disk Controller",		\
 			Pci2220i_Detect,						\
-			NULL,									\
+			Pci2220i_Release,						\
 			NULL,	 								\
 			Pci2220i_Command,						\
 			Pci2220i_QueueCommand,					\
@@ -313,4 +346,6 @@
 			0, 										\
 			0, 										\
 			DISABLE_CLUSTERING }
+#endif
 
+#endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)