patch-2.3.35 linux/drivers/scsi/fdomain.c
Next file: linux/drivers/scsi/hosts.h
Previous file: linux/drivers/scsi/fcal.c
Back to the patch index
Back to the overall index
- Lines: 84
- Date:
Tue Dec 21 10:17:32 1999
- Orig file:
v2.3.34/linux/drivers/scsi/fdomain.c
- Orig date:
Tue Nov 23 22:42:21 1999
diff -u --recursive --new-file v2.3.34/linux/drivers/scsi/fdomain.c linux/drivers/scsi/fdomain.c
@@ -280,6 +280,7 @@
#undef MODULE
#endif
+#include <linux/init.h>
#include <linux/sched.h>
#include <asm/io.h>
#include <linux/blk.h>
@@ -427,8 +428,8 @@
parameters. For example:
insmod fdomain fdomain=0x140,11
*/
-static int fdomain[]={ 0, 0, 0 };
-MODULE_PARM(fdomain, "2-3i");
+static char * fdomain = NULL;
+MODULE_PARM(fdomain, "s");
#endif
static unsigned long addresses[] = {
@@ -563,21 +564,30 @@
printk( "\n" );
}
-void fdomain_setup( char *str, int *ints )
+static int __init fdomain_setup( char *str )
{
- if (setup_called++ || ints[0] < 2 || ints[0] > 3) {
- printk( "scsi: <fdomain>"
- " Usage: fdomain=<PORT_BASE>,<IRQ>[,<ADAPTER_ID>]\n" );
- printk( "scsi: <fdomain> Bad LILO/INSMOD parameters?\n" );
- }
+ int ints[4];
+
+ (void)get_options(str, ARRAY_SIZE(ints), ints);
- port_base = ints[0] >= 1 ? ints[1] : 0;
- interrupt_level = ints[0] >= 2 ? ints[2] : 0;
- this_id = ints[0] >= 3 ? ints[3] : 0;
+ if (setup_called++ || ints[0] < 2 || ints[0] > 3) {
+ printk( "scsi: <fdomain>"
+ " Usage: fdomain=<PORT_BASE>,<IRQ>[,<ADAPTER_ID>]\n" );
+ printk( "scsi: <fdomain> Bad LILO/INSMOD parameters?\n" );
+ return 0;
+ }
+
+ port_base = ints[0] >= 1 ? ints[1] : 0;
+ interrupt_level = ints[0] >= 2 ? ints[2] : 0;
+ this_id = ints[0] >= 3 ? ints[3] : 0;
- bios_major = bios_minor = -1; /* Use geometry for BIOS version >= 3.4 */
+ bios_major = bios_minor = -1; /* Use geometry for BIOS version >= 3.4 */
+ ++setup_called;
+ return 1;
}
+__setup("fdomain=", fdomain_setup);
+
static void do_pause( unsigned amount ) /* Pause for amount*10 milliseconds */
{
@@ -694,6 +704,7 @@
printk( "scsi: <fdomain> fdomain_isa_detect:" );
#endif
+
for (i = 0; !bios_base && i < ADDRESS_COUNT; i++) {
#if DEBUG_DETECT
printk( " %lx(%lx),", addresses[i], bios_base );
@@ -880,13 +891,8 @@
tpnt->proc_name = "fdomain";
#ifdef MODULE
- if (fdomain[0] || fdomain[1] || fdomain[2]) {
- port_base = fdomain[0];
- interrupt_level = fdomain[1];
- this_id = fdomain[2];
- bios_major = bios_minor = -1;
- ++setup_called;
- }
+ if (fdomain)
+ fdomain_setup(fdomain);
#endif
if (setup_called) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)