patch-2.4.4 linux/drivers/scsi/tmscsim.c

Next file: linux/drivers/scsi/tmscsim.h
Previous file: linux/drivers/scsi/sym53c8xx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/drivers/scsi/tmscsim.c linux/drivers/scsi/tmscsim.c
@@ -206,10 +206,7 @@
 #define DCBDEBUG1(x)
 
 /* Includes */
-#ifdef MODULE
-# include <linux/module.h>
-#endif
-
+#include <linux/module.h>
 #include <asm/dma.h>
 #include <asm/io.h>
 #include <asm/system.h>
@@ -663,16 +660,30 @@
  * tmscsim: AdaptID, MaxSpeed (Index), DevMode (Bitmapped), AdaptMode (Bitmapped)
  */
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,3,13)
-void __init dc390_setup (char *str)
+int __init dc390_setup (char *str)
 {	
 	int ints[8];
 	int i, im;
 	(void)get_options (str, ARRAY_SIZE(ints), ints);
+	im = ints[0];
+	if (im > 6)
+	{
+		printk (KERN_NOTICE "DC390: ignore extra params!\n");
+		im = 6;
+	};
+	for (i = 0; i < im; i++)
+		tmscsim[i] = ints[i+1];
+	/* dc390_checkparams (); */
+	return 1;
+};
+#ifndef MODULE
+__setup("tmscsim=", dc390_setup);
+#endif
+
 #else
 void __init dc390_setup (char *str, int *ints)
 {
 	int i, im;
-#endif
 	im = ints[0];
 	if (im > 6)
 	{
@@ -683,14 +694,10 @@
 		tmscsim[i] = ints[i+1];
 	/* dc390_checkparams (); */
 };
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)
-#ifndef MODULE
-__setup("tmscsim=", dc390_setup);
-#endif
 #endif
 
 
+
 static void __init dc390_EEpromOutDI( PDEVDECL, PUCHAR regval, UCHAR Carry )
 {
     UCHAR bval;
@@ -828,7 +835,7 @@
 /* Queueing philosphy:
  * There are a couple of lists:
  * - Query: Contains the Scsi Commands not yet turned into SRBs (per ACB)
- *   (Note: For new EH, it is unecessary!)
+ *   (Note: For new EH, it is unnecessary!)
  * - Waiting: Contains a list of SRBs not yet sent (per DCB)
  * - Free: List of free SRB slots
  * 
@@ -2198,6 +2205,7 @@
     psh = scsi_register( psht, sizeof(DC390_ACB) );
     if( !psh ) return( -1 );
 	
+    scsi_set_pci_device(psh, pdev);
     pACB = (PACB) psh->hostdata;
     DC390_LOCKA_INIT;
     DC390_LOCK_ACB;
@@ -2852,7 +2860,7 @@
 {
   int dev, spd, spd1;
   char *pos = buffer;
-  PSH shpnt;
+  PSH shpnt = 0;
   PACB pACB;
   PDCB pDCB;
   PSCSICMD pcmd;

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