[PATCH] drivers/scsi/g_NCR5380.c, kernel 2.4.2

From: Martin Storsjö (martin.storsjo@pp.qnet.fi)
Date: Fri Feb 23 2001 - 16:54:51 EST


Hello

I found out that passing boot parameters to the g_NCR5380-driver didn't
work in the 2.4.x-series. It seems like other drivers might be affected,
too. I don't know if this has been discussed before, or if I'm doing
something completely wrong, but at least this patch of mine fixed the
problem. My solution is actually a simple modification of what I found
in aha152x.c. (It also fixes a very minor problem caused by using a
compile-time parameter, which is probably almost never used.)

I'm not subscribed to the list, so I'd be thankful for being personally
contacted with follow-up on this.

// Martin

--- linux/drivers/scsi/g_NCR5380.c.orig Thu Feb 22 19:11:42 2001
+++ linux/drivers/scsi/g_NCR5380.c Fri Feb 23 23:33:38 2001
@@ -139,7 +139,7 @@
     int board; /* Use NCR53c400, Ricoh, etc. extensions ? */
 } overrides
 #ifdef GENERIC_NCR5380_OVERRIDE
- [] __initdata = GENERIC_NCR5380_OVERRIDE
+ [] __initdata = GENERIC_NCR5380_OVERRIDE;
 #else
     [1] __initdata = {{0,},};
 #endif
@@ -911,6 +911,53 @@
 MODULE_PARM(ncr_53c400, "i");
 MODULE_PARM(ncr_53c400a, "i");
 MODULE_PARM(dtc_3181e, "i");
+
+#else
+
+static int __init do_NCR5380_setup(char *str)
+{
+ int ints[10];
+
+ get_options(str, sizeof(ints)/sizeof(int), ints);
+ generic_NCR5380_setup(str,ints);
+
+ return 1;
+}
+
+static int __init do_NCR53C400_setup(char *str)
+{
+ int ints[10];
+
+ get_options(str, sizeof(ints)/sizeof(int), ints);
+ generic_NCR53C400_setup(str,ints);
+
+ return 1;
+}
+
+static int __init do_NCR53C400A_setup(char *str)
+{
+ int ints[10];
+
+ get_options(str, sizeof(ints)/sizeof(int), ints);
+ generic_NCR53C400A_setup(str,ints);
+
+ return 1;
+}
+
+static int __init do_DTC3181E_setup(char *str)
+{
+ int ints[10];
+
+ get_options(str, sizeof(ints)/sizeof(int), ints);
+ generic_DTC3181E_setup(str,ints);
+
+ return 1;
+}
+
+__setup("ncr5380=", do_NCR5380_setup);
+__setup("ncr53c400=", do_NCR53C400_setup);
+__setup("ncr53c400a=", do_NCR53C400A_setup);
+__setup("dtc3181e=", do_DTC3181E_setup);

 #endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 23 2001 - 21:00:31 EST