diff -urN linux-2.2.16-3.orig/drivers/scsi/aacraid/KNOWNBUGS linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/KNOWNBUGS --- linux-2.2.16-3.orig/drivers/scsi/aacraid/KNOWNBUGS Wed Dec 31 19:00:00 1969 +++ linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/KNOWNBUGS Fri Jul 21 17:07:49 2000 @@ -0,0 +1,11 @@ +The aacraid driver is new to open source and has not seen extensive +testing when compiled as part of the resident kernel. The module +version has seen a number of QA cycles and appears to be very stable. + +There is however a known problem when compiling the aacraid driver +as part of the resident kernel in an SMP environment. The end +result is a kernel panic allmost 100% of the time during boot. + +It appears the same CPU is trying to acquire the same spinlock more +than once, which we all know is bad. Once this problem has been +resolved, a patch will be distributed. \ No newline at end of file diff -urN linux-2.2.16-3.orig/drivers/scsi/aacraid/README linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/README --- linux-2.2.16-3.orig/drivers/scsi/aacraid/README Wed Dec 31 19:00:00 1969 +++ linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/README Fri Jul 21 17:16:16 2000 @@ -0,0 +1,30 @@ + AACRAID Driver for Linux + +Introduction +------------------------- +The aacraid driver adds support for Adaptec (http://www.adaptec.com) +OEM based RAID controllers. + +Supported Cards/Chipsets +------------------------- + Dell Computer Corporation PERC 2 Quad Channel + Dell Computer Corporation PERC 3/Di + Dell Computer Corporation PERC 3/Si + HP NetRAID-4M + +Not Supported Devices +------------------------- + Any and All Adaptec branded raid controllers. + +People +------------------------- + Brian M. Boerner + +Mailing List +------------------------- +There is currently a mailing list being created for aacraid. This +will all be straitened out before the driver is submitted for +inclusion in the standard kernel distribution. + +$Revision: 0.01 $ +Modified by Brian Boerner 2000 \ No newline at end of file diff -urN linux-2.2.16-3.orig/drivers/scsi/aacraid/aacid.c linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/aacid.c --- linux-2.2.16-3.orig/drivers/scsi/aacraid/aacid.c Fri Jul 21 10:18:18 2000 +++ linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/aacid.c Fri Jul 21 17:02:18 2000 @@ -131,11 +131,15 @@ */ FSA_MINIPORT MiniPorts[] = { - { 0x1028, 0x0001, 0x1028, 0x0001, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, // PowerEdge 2400 - { 0x1028, 0x0002, 0x1028, 0x0002, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, // PowerEdge 4400 - { 0x1028, 0x0003, 0x1028, 0x0003, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, // PowerEdge 2450 - { 0x1011, 0x0046, 0x9005, 0x1364, "afa", SaInitDevice, "percraid", "DELL ", "PERCRAID " }, // Dell PERC2 "Quad Channel" - { 0x1011, 0x0046, 0x103c, 0x10c2, "hpn", SaInitDevice, "hpnraid", "HP ", "NetRAID-4M " } // HP NetRAID-4M + { 0x1028, 0x0001, 0x1028, 0x0001, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, /* PERC 3/Si */ + { 0x1028, 0x0002, 0x1028, 0x0002, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, /* PERC 3/Di */ + { 0x1028, 0x0003, 0x1028, 0x0003, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, /* PERC 3/Si */ + { 0x1028, 0x0004, 0x1028, 0x00d0, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, /* PERC 3/Si */ + { 0x1028, 0x0005, 0x1028, 0x00d1, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, /* PERC 3/Di */ + { 0x1028, 0x0006, 0x1028, 0x00d9, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, /* PERC 3/Di */ + { 0x1028, 0x0008, 0x1028, 0x00cf, "afa", RxInitDevice, "percraid", "DELL ", "PERCRAID " }, /* PERC 3/Di */ + { 0x1011, 0x0046, 0x9005, 0x1364, "afa", SaInitDevice, "percraid", "DELL ", "PERCRAID " }, /* Dell PERC2 "Quad Channel */ + { 0x1011, 0x0046, 0x103c, 0x10c2, "hpn", SaInitDevice, "hpnraid", "HP ", "NetRAID-4M " } /* HP NetRAID-4M */ }; diff -urN linux-2.2.16-3.orig/drivers/scsi/aacraid/include/osheaders.h linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/include/osheaders.h --- linux-2.2.16-3.orig/drivers/scsi/aacraid/include/osheaders.h Fri Jul 21 10:18:18 2000 +++ linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/include/osheaders.h Fri Jul 21 11:18:29 2000 @@ -70,6 +70,7 @@ #include #include #include +#include #include #include "scsi.h" #include "hosts.h" diff -urN linux-2.2.16-3.orig/drivers/scsi/aacraid/include/ostypes.h linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/include/ostypes.h --- linux-2.2.16-3.orig/drivers/scsi/aacraid/include/ostypes.h Fri Jul 21 10:18:18 2000 +++ linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/include/ostypes.h Fri Jul 21 11:18:29 2000 @@ -29,6 +29,8 @@ #ifndef _OSTYPES_H_ #define _OSTYPES_H_ +#include + #define MAXIMUM_NUM_CONTAINERS 64 // 4 Luns * 16 Targets #define MAXIMUM_NUM_ADAPTERS 8 @@ -60,7 +62,7 @@ typedef struct OS_SPINLOCK { spinlock_t spin_lock; - unsigned cpu_lock_count[8]; + unsigned cpu_lock_count[NR_CPUS]; long cpu_flag; long lockout_count; } OS_SPINLOCK; diff -urN linux-2.2.16-3.orig/drivers/scsi/aacraid/osfuncs.c linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/osfuncs.c --- linux-2.2.16-3.orig/drivers/scsi/aacraid/osfuncs.c Fri Jul 21 10:18:18 2000 +++ linux-2.2.16-3-aac-patched/drivers/scsi/aacraid/osfuncs.c Fri Jul 21 11:18:29 2000 @@ -178,7 +178,7 @@ SpinLock = ( OS_SPINLOCK * )kmalloc( sizeof( OS_SPINLOCK ), GFP_KERNEL ); SpinLock->spin_lock = SPIN_LOCK_UNLOCKED; - for( i = 0; i < 8; i++ ) + for( i = 0; i < NR_CPUS; i++ ) SpinLock->cpu_lock_count[ i ] = 0; return( SpinLock ); } @@ -229,7 +229,7 @@ panic( "CPU %d trying to acquire lock again: lock count = %d\n", cpu_id, SpinLock->cpu_lock_count[ cpu_id ] ); /* - for( i = 0; i < 8; i++ ) + for( i = 0; i < NR_CPUS; i++ ) if( SpinLock->cpu_lock_count[ i ] ) panic( "Another CPU has the lock\n" ); */