lkml.org 
[lkml]   [1999]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectRe: Adaptec 1542 and kernel 2.2.11&12 not working?
Attached are the correct patches for the aha1542 driver (for both
2.2.10 and 2.2.12 kernels)...

Instead of incorrectly assigning bases[x] all the values (stupid mistake
on my part), the proper values are passed to the appropriate variables:
bases, setup_buson, setup_busoff, and setup_dmaspeed. If anyone has
problems with this, let me know ASAP.

Regards,
Chris

-----
Chris D. Faulhaber <jedgar@fxp.org> | All the true gurus I've met never
System/Network Administrator, | claimed they were one and always
Reality Check Information, Inc. | pointed to someone better.

diff -urN linux-2.2.10/drivers/scsi/aha1542.c linux/drivers/scsi/aha1542.c
--- linux-2.2.10/drivers/scsi/aha1542.c Wed Oct 7 18:52:55 1998
+++ linux/drivers/scsi/aha1542.c Sat Sep 11 14:20:23 1999
@@ -18,6 +18,9 @@
* 1-Jan-97
* Modified by Bjorn L. Thordarson and Einar Thor Einarsson
* Recognize that DMA0 is valid DMA channel -- 13-Jul-98
+ * Modified by Chris Faulhaber <jedgar@fxp.org>
+ * Added module command-line options
+ * 19-Jul-99
*/

#include <linux/module.h>
@@ -84,7 +87,7 @@
static char *setup_str[MAXBOARDS] = {(char *)NULL,(char *)NULL};

/*
- * LILO params: aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]
+ * LILO/Module params: aha1542=<PORTBASE>[,<BUSON>,<BUSOFF>[,<DMASPEED>]]
*
* Where: <PORTBASE> is any of the valid AHA addresses:
* 0x130, 0x134, 0x230, 0x234, 0x330, 0x334
@@ -100,6 +103,11 @@
* Factory default is 5 MB/s.
*/

+#ifdef MODULE
+int aha1542[] = { 0x330, 11, 4, -1 };
+MODULE_PARM(aha1542, "1-4i");
+#endif
+
#define BIOS_TRANSLATION_1632 0 /* Used by some old 1542A boards */
#define BIOS_TRANSLATION_6432 1 /* Default case these days */
#define BIOS_TRANSLATION_25563 2 /* Big disk case */
@@ -953,6 +961,33 @@
DEB(printk("aha1542_detect: \n"));

tpnt->proc_dir = &proc_scsi_aha1542;
+
+#ifdef MODULE
+ bases[0] = aha1542[0];
+ setup_buson[0] = aha1542[1];
+ setup_busoff[0] = aha1542[2];
+ {
+ int atbt = -1;
+ switch (aha1542[3]) {
+ case 5:
+ atbt = 0x00;
+ break;
+ case 6:
+ atbt = 0x04;
+ break;
+ case 7:
+ atbt = 0x01;
+ break;
+ case 8:
+ atbt = 0x02;
+ break;
+ case 10:
+ atbt = 0x03;
+ break;
+ };
+ setup_dmaspeed[0] = atbt;
+ }
+#endif

for(indx = 0; indx < sizeof(bases)/sizeof(bases[0]); indx++)
if(bases[indx] != 0 && !check_region(bases[indx], 4)) { diff -urN linux-2.2.12/drivers/scsi/aha1542.c linux/drivers/scsi/aha1542.c
--- linux-2.2.12/drivers/scsi/aha1542.c Sat Sep 11 14:38:18 1999
+++ linux/drivers/scsi/aha1542.c Sat Sep 11 14:42:02 1999
@@ -20,7 +20,7 @@
* Recognize that DMA0 is valid DMA channel -- 13-Jul-98
* Modified by Chris Faulhaber <jedgar@fxp.org>
* Added module command-line options
- * 18-Jul-99
+ * 19-Jul-99
*/

#include <linux/module.h>
@@ -964,11 +964,30 @@
tpnt->proc_dir = &proc_scsi_aha1542;

#ifdef MODULE
- bases[0] = 4;
- bases[1] = aha1542[0];
- bases[2] = aha1542[1];
- bases[3] = aha1542[2];
- bases[4] = aha1542[3];
+ bases[0] = aha1542[0];
+ setup_buson[0] = aha1542[1];
+ setup_busoff[0] = aha1542[2];
+ {
+ int atbt = -1;
+ switch (aha1542[3]) {
+ case 5:
+ atbt = 0x00;
+ break;
+ case 6:
+ atbt = 0x04;
+ break;
+ case 7:
+ atbt = 0x01;
+ break;
+ case 8:
+ atbt = 0x02;
+ break;
+ case 10:
+ atbt = 0x03;
+ break;
+ };
+ setup_dmaspeed[0] = atbt;
+ }
#endif

for(indx = 0; indx < sizeof(bases)/sizeof(bases[0]); indx++)
\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.077 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site