PATCH: cpqarray.c boot prams support for 2.3 kernels

Richard Hirst (richard@sleepie.demon.co.uk)
Fri, 22 Oct 1999 00:03:13 +0100


Hi,
In order to use the Compaq array driver with EISA SMART controllers
you have to specify something like 'smart2=0x1000' at boot time.
That no longer works with 2.3 kernels, due to kernel changes.
The patch below fixes it.

I also noticed that 2.2 kernels have cpqarray.c version 1.0.5 while
2.3 kernels have version 1.0.4. Is that deliberate?

Richard

--- linux-2.3.22clean/drivers/block/cpqarray.c Tue Oct 19 21:14:02 1999
+++ linux-2.3.22/drivers/block/cpqarray.c Thu Oct 21 23:17:42 1999
@@ -34,6 +34,7 @@
#include <linux/blkpg.h>
#include <linux/timer.h>
#include <linux/proc_fs.h>
+#include <linux/init.h>
#include <linux/hdreg.h>
#include <linux/spinlock.h>
#include <asm/uaccess.h>
@@ -703,6 +704,26 @@
return (ulong) (page_remapped ? (page_remapped + page_offs) : 0UL);
}

+#ifndef MODULE
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13)
+/*
+ * Config string is a comma seperated set of i/o addresses of EISA cards.
+ */
+static int cpqarray_setup(char *str)
+{
+ int i, ints[9];
+
+ (void)get_options(str, ARRAY_SIZE(ints), ints);
+
+ for(i=0; i<ints[0] && i<8; i++)
+ eisa[i] = ints[i+1];
+ return 1;
+}
+
+__setup("smart2=", cpqarray_setup);
+
+#else
+
/*
* Copy the contents of the ints[] array passed to us by init.
*/
@@ -712,6 +733,8 @@
for(i=0; i<ints[0] && i<8; i++)
eisa[i] = ints[i+1];
}
+#endif
+#endif

/*
* Find an EISA controller's signature. Set up an hba if we find it.

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