[1948] in linux-scsi channel archive
2.0.30 and May 8 AIC7xxx driver release patch
daemon@ATHENA.MIT.EDU (Larry M. Augustin)
Wed Jun 4 01:10:10 1997
Date: Tue, 3 Jun 1997 22:06:27 -0700
From: "Larry M. Augustin" <lma@varesearch.com>
To: deischen@iworks.InterWorks.org, linux-scsi@vger.rutgers.edu
Here's a patch for Dan Eischen's May 8 AIC7xxx driver release for the
2.0.30 kernel. This patch fixes the drivers/scsi/Makefile and adds
various configurable parameters to the Config.in script so you don't
have to edit the #defines in the .c file.
Under 2.0.30:
1. Delete all the old aic7xxx files.
cd drivers/scsi
rm aic7xxx*
2. Copy the May8 release files to the drivers/scsi directory:
cd May8
cp -a aic7xxx* /usr/src/linux/drivers/scsi
(NOTE: Don't copy the new Makefile.)
3. Apply the patch.
Larry
diff -r -c linux-2.0.30/Documentation/Configure.help linux-2.0.30-new/Documentation/Configure.help
*** linux-2.0.30/Documentation/Configure.help Tue Apr 8 08:47:45 1997
--- linux-2.0.30-new/Documentation/Configure.help Tue Jun 3 21:22:35 1997
***************
*** 1379,1384 ****
--- 1379,1435 ----
code which can be inserted in and removed from the running kernel
whenever you want), say M here and read Documentation/modules.txt.
+ enable tagged command queueing
+ CONFIG_AIC7XXX_TAGGED_QUEUEING
+ This option allows you to enable tagged command queueing for this
+ driver. Some scsi devices do not properly support this
+ feature. Tagged command queueing will improve performance.
+
+ maximum number of commands per LUN
+ CONFIG_AIC7XXX_CMDS_PER_LUN
+ This option allows you to set the maximum number of commands queued
+ per LUN. If tagged queueing is enabled, then you may want to try
+ increasing AIC7XXX_CMDS_PER_LUN to more than 2. By default, we limit
+ the SCBs per LUN to 2 with or without tagged queueing enabled. If
+ tagged queueing is disabled, the sequencer will keep the 2nd SCB in
+ the input queue until the first one completes - so it is OK to to have
+ more than 1 SCB queued. If tagged queueing is enabled, then the
+ sequencer will attempt to send the 2nd SCB to the device while the
+ first SCB is executing and the device is disconnected. For adapters
+ limited to 4 SCBs, you may want to actually decrease the commands per
+ LUN to 1, if you often have more than 2 devices active at the same
+ time. This will allocate 1 SCB for each device and ensure that there
+ will always be a free SCB for up to 4 devices active at the same time.
+ When SCB paging is enabled, set the commands per LUN to 8 or higher
+ (see SCB paging support below). Note that if AIC7XXX_CMDS_PER_LUN is
+ not defined and tagged queueing is enabled, the driver will attempt to
+ set the commands per LUN using its own heuristic based on the number
+ of available SCBs.
+
+ enable SCB paging
+ CONFIG_AIC7XXX_PAGE_ENABLE
+ This option enables SCB paging. This will increase performance when
+ tagged queueing is enabled. Note that you should increase the
+ AIC7XXX_CMDS_PER_LUN to 8 as most tagged queueing devices allow at
+ least this many
+
+ use external SCB bank
+ CONFIG_AIC7XXX_USE_EXT_SCBRAM
+ This option enables use of the external bank of 255 SCBs. For 3985
+ adapters, this will also enable sharing of the SCB array across all
+ three controllers.
+
+ collect statistics to report in /proc
+ CONFIG_AIC7XXX_PROC_STATS
+ This option enables collection of SCSI transfer statistics for the
+ /proc filesystem. Do NOT enable this when running on kernels version
+ 1.2.x and below. This does affect performance since it has to
+ maintain statistics.
+
+ delay in seconds after SCSI bus reset
+ CONFIG_AIC7XXX_RESET_DELAY
+ This option sets the delay in seconds after a SCSI bus reset.
+
BusLogic SCSI support
CONFIG_SCSI_BUSLOGIC
This is support for BusLogic MultiMaster and FlashPoint SCSI Host Adapters.
diff -r -c linux-2.0.30/drivers/scsi/Config.in linux-2.0.30-new/drivers/scsi/Config.in
*** linux-2.0.30/drivers/scsi/Config.in Fri Feb 28 15:14:18 1997
--- linux-2.0.30-new/drivers/scsi/Config.in Tue Jun 3 21:03:51 1997
***************
*** 19,24 ****
--- 19,32 ----
dep_tristate 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 $CONFIG_SCSI
dep_tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 $CONFIG_SCSI
dep_tristate 'Adaptec AHA274X/284X/294X support' CONFIG_SCSI_AIC7XXX $CONFIG_SCSI
+ if [ "$CONFIG_SCSI_AIC7XXX" != "n" ]; then
+ bool ' enable tagged command queueing' CONFIG_AIC7XXX_TAGGED_QUEUEING
+ int ' maximum number of commands per LUN' CONFIG_AIC7XXX_CMDS_PER_LUN 16
+ bool ' enable SCB paging' CONFIG_AIC7XXX_PAGE_ENABLE
+ bool ' use external SCB bank' CONFIG_AIC7XXX_USE_EXT_SCBRAM
+ bool ' collect statistics to report in /proc' CONFIG_AIC7XXX_PROC_STATS
+ int ' delay in seconds after SCSI bus reset' CONFIG_AIC7XXX_RESET_DELAY 15
+ fi
dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI
dep_tristate 'Always IN2000 SCSI support' CONFIG_SCSI_IN2000 $CONFIG_SCSI
dep_tristate 'AM53/79C974 PCI SCSI support' CONFIG_SCSI_AM53C974 $CONFIG_SCSI
diff -r -c linux-2.0.30/drivers/scsi/Makefile linux-2.0.30-new/drivers/scsi/Makefile
*** linux-2.0.30/drivers/scsi/Makefile Fri Feb 28 15:14:18 1997
--- linux-2.0.30-new/drivers/scsi/Makefile Tue Jun 3 20:11:46 1997
***************
*** 359,370 ****
aha152x.o: aha152x.c
$(CC) $(CFLAGS) $(AHA152X) -c aha152x.c
! aic7xxx_asm: aic7xxx_asm.c
! $(HOSTCC) -o $@ aic7xxx_asm.c
! aic7xxx.c: aic7xxx_seq.h
! aic7xxx_seq.h: aic7xxx_asm aic7xxx.seq
! ./aic7xxx_asm -o $@ aic7xxx.seq
seagate.o: seagate.c
$(CC) $(CFLAGS) -DARBITRATE -DSLOW_HANDSHAKE -DFAST32 -c seagate.c
--- 359,377 ----
aha152x.o: aha152x.c
$(CC) $(CFLAGS) $(AHA152X) -c aha152x.c
! aic7xxx/aic7xxx_asm: aic7xxx/aic7xxx_asm.c
! (cd ./aic7xxx; make aic7xxx_asm)
! aic7xxx_seq.h: aic7xxx/aic7xxx_asm aic7xxx/aic7xxx.seq
! ./aic7xxx/aic7xxx_asm -nostdinc -I- -Iaic7xxx -o $@ aic7xxx/aic7xxx.seq
!
! aic7xxx_reg.h: aic7xxx/aic7xxx_asm aic7xxx/aic7xxx.seq
! ./aic7xxx/aic7xxx_asm -nostdinc -I- -Iaic7xxx -r $@ aic7xxx/aic7xxx.seq
!
! aic7xxx.o: aic7xxx.c aic7xxx_seq.h aic7xxx_reg.h
! $(CC) $(CFLAGS) -c -o $@ aic7xxx.c
! rm aic7xxx_seq.h aic7xxx_reg.h
! (cd aic7xxx; make clean)
seagate.o: seagate.c
$(CC) $(CFLAGS) -DARBITRATE -DSLOW_HANDSHAKE -DFAST32 -c seagate.c
diff -r -c linux-2.0.30/drivers/scsi/aic7xxx/Makefile linux-2.0.30-new/drivers/scsi/aic7xxx/Makefile
*** linux-2.0.30/drivers/scsi/aic7xxx/Makefile Thu May 8 07:03:54 1997
--- linux-2.0.30-new/drivers/scsi/aic7xxx/Makefile Tue Jun 3 20:16:53 1997
***************
*** 13,19 ****
LIBS = -L/usr/local/lib -ldb
NOMAN= noman
! LEX = lex
LFLAGS = -t
YACC = yacc
YFLAGS = -d
--- 13,19 ----
LIBS = -L/usr/local/lib -ldb
NOMAN= noman
! LEX = flex -l
LFLAGS = -t
YACC = yacc
YFLAGS = -d
diff -r -c linux-2.0.30/drivers/scsi/aic7xxx.c linux-2.0.30-new/drivers/scsi/aic7xxx.c
*** linux-2.0.30/drivers/scsi/aic7xxx.c Thu May 8 10:14:39 1997
--- linux-2.0.30-new/drivers/scsi/aic7xxx.c Tue Jun 3 21:08:32 1997
***************
*** 183,220 ****
* Daniel M. Eischen, deischen@iworks.InterWorks.org, 01/26/96
*/
! /* Uncomment this for tagged queueing. */
! /* #define AIC7XXX_TAGGED_QUEUEING */
/*
* You can try raising me if tagged queueing is enabled, or lowering
* me if you only have 4 SCBs.
*/
! /* #define AIC7XXX_CMDS_PER_LUN 16 */
/* Set this to the delay in seconds after SCSI bus reset. */
#define AIC7XXX_RESET_DELAY 15
/*
! * Uncomment the following define for collection of SCSI transfer statistics
* for the /proc filesystem.
*
* NOTE: Do NOT enable this when running on kernels version 1.2.x and below.
* NOTE: This does affect performance since it has to maintain statistics.
*/
! /* #define AIC7XXX_PROC_STATS */
/*
! * Uncomment the following to enable SCB paging.
*/
! /* #define AIC7XXX_PAGE_ENABLE */
/*
* Uncomment the following to enable use of the external bank
* of 255 SCBs. For 3985 adapters, this will also enable sharing
* of the SCB array across all three controllers.
*/
! /* #define AIC7XXX_USE_EXT_SCBRAM */
/*
* For debugging the abort/reset code.
--- 183,236 ----
* Daniel M. Eischen, deischen@iworks.InterWorks.org, 01/26/96
*/
! /* Enable tagged queueing. */
! #ifdef CONFIG_AIC7XXX_TAGGED_QUEUEING
! #define AIC7XXX_TAGGED_QUEUEING
! #endif
/*
* You can try raising me if tagged queueing is enabled, or lowering
* me if you only have 4 SCBs.
*/
! #ifdef CONFIG_AIC7XXX_CMDS_PER_LUN
! #define AIC7XXX_CMDS_PER_LUN CONFIG_AIC7XXX_CMDS_PER_LUN
! #else
! #define AIC7XXX_CMDS_PER_LUN 4
! #endif
/* Set this to the delay in seconds after SCSI bus reset. */
+ #ifdef CONFIG_AIC7XXX_RESET_DELAY
+ #define AIC7XXX_RESET_DELAY CONFIG_AIC7XXX_RESET_DELAY
+ #else
#define AIC7XXX_RESET_DELAY 15
+ #endif
/*
! * Control collection of SCSI transfer statistics
* for the /proc filesystem.
*
* NOTE: Do NOT enable this when running on kernels version 1.2.x and below.
* NOTE: This does affect performance since it has to maintain statistics.
*/
! #ifdef CONFIG_AIC7XXX_PROC_STATS
! #define AIC7XXX_PROC_STATS
! #endif
/*
! * Enable SCB paging.
*/
! #ifdef CONFIG_AIC7XXX_PAGE_ENABLE
! #define AIC7XXX_PAGE_ENABLE
! #endif
/*
* Uncomment the following to enable use of the external bank
* of 255 SCBs. For 3985 adapters, this will also enable sharing
* of the SCB array across all three controllers.
*/
! #ifdef CONFIG_AIC7XXX_USE_EXT_SCBRAM
! #define AIC7XXX_USE_EXT_SCBRAM
! #endif
/*
* For debugging the abort/reset code.