--- linux/drivers/scsi/aic7xxx.c.old Mon Sep 22 04:17:44 1997 +++ linux/drivers/scsi/aic7xxx.c Mon Sep 22 04:32:02 1997 @@ -4071,7 +4071,7 @@ #ifndef AIC7XXX_TAGGED_QUEUEING_BY_DEVICE device->queue_depth = default_depth; #else - if (p->instance > NUMBER(aic7xxx_tag_info)) + if (p->instance >= NUMBER(aic7xxx_tag_info)) { device->queue_depth = default_depth; } @@ -5314,8 +5314,11 @@ */ outb(p->qcntmask, p->base + QCNTMASK); - outb(p->qfullcount, p->base + FIFODEPTH); - outb(0, p->base + CMDOUTCNT); + if (p->flags & PAGE_ENABLED) + { + outb(p->qfullcount, p->base + FIFODEPTH); + outb(0, p->base + CMDOUTCNT); + } /* * We don't have any waiting selections or disconnected SCBs. --- linux/drivers/scsi/aic7xxx_proc.c.old Mon Sep 22 04:21:45 1997 +++ linux/drivers/scsi/aic7xxx_proc.c Mon Sep 22 04:24:12 1997 @@ -154,7 +154,10 @@ #endif if ( aic7xxx_buffer_size != size) { if ( aic7xxx_buffer != NULL) + { kfree ( aic7xxx_buffer); + aic7xxx_buffer_size = 0; + } aic7xxx_buffer = kmalloc ( size, GFP_KERNEL); } if ( aic7xxx_buffer == NULL) { --- linux/drivers/scsi/aic7xxx_seq.h.old Mon Sep 22 04:17:25 1997 +++ linux/drivers/scsi/aic7xxx_seq.h Mon Sep 22 04:20:59 1997 @@ -26,8 +26,8 @@ 0x50, 0x6a, 0x60, 0x00, 0xff, 0x90, 0x4a, 0x02, 0x00, 0xa1, 0xa1, 0x17, - 0xff, 0x6c, 0x5b, 0x02, - 0xff, 0x5b, 0x27, 0x1c, + 0xff, 0x6c, 0x59, 0x02, + 0xff, 0x59, 0x27, 0x1c, 0xff, 0x4a, 0x90, 0x02, 0x00, 0x65, 0xaa, 0x17, 0x00, 0x6a, 0x52, 0x17, @@ -37,7 +37,7 @@ 0x00, 0x65, 0xbb, 0x17, 0x10, 0x6a, 0x60, 0x00, 0x00, 0x65, 0x03, 0x10, - 0xff, 0x5b, 0x90, 0x02, + 0xff, 0x59, 0x90, 0x02, 0xff, 0x58, 0xb3, 0x02, 0x10, 0x6a, 0x60, 0x00, 0x00, 0x65, 0x03, 0x10, @@ -217,7 +217,7 @@ 0x00, 0xb9, 0x77, 0x17, 0xff, 0xa2, 0xda, 0x1e, 0x71, 0x6a, 0x91, 0x00, - 0x40, 0x5b, 0xda, 0x18, + 0x40, 0x59, 0xda, 0x18, 0xff, 0xb9, 0xb3, 0x02, 0x00, 0x65, 0xe7, 0x10, 0x20, 0xa0, 0xe0, 0x1a, @@ -226,9 +226,9 @@ 0x00, 0xa1, 0xa1, 0x17, 0xff, 0x49, 0x6d, 0x02, 0xff, 0x4a, 0x90, 0x02, - 0xff, 0x5a, 0x64, 0x02, - 0x00, 0x59, 0xe1, 0x1c, - 0x01, 0x59, 0x59, 0x06, + 0xff, 0x5b, 0x64, 0x02, + 0x00, 0x5a, 0xe1, 0x1c, + 0x01, 0x5a, 0x5a, 0x06, 0xff, 0xb9, 0x9d, 0x02, 0x02, 0x6a, 0x91, 0x00, 0x08, 0xa0, 0xe7, 0x1e, @@ -255,8 +255,8 @@ 0xff, 0x66, 0x66, 0x06, 0xff, 0x64, 0xf7, 0x1a, 0x41, 0x6a, 0x91, 0x00, - 0x20, 0x5b, 0xcd, 0x1c, - 0x80, 0x5b, 0xcf, 0x18, + 0x20, 0x59, 0xcd, 0x1c, + 0x80, 0x59, 0xcf, 0x18, 0x10, 0x4c, 0x03, 0x00, 0x00, 0x65, 0xcf, 0x10, 0x04, 0xa0, 0xa0, 0x00, @@ -276,10 +276,10 @@ 0x07, 0x64, 0x64, 0x02, 0x00, 0x42, 0x42, 0x00, 0x00, 0x42, 0xa1, 0x17, - 0xff, 0x6c, 0x5b, 0x02, - 0xff, 0x5b, 0x28, 0x19, - 0xff, 0x5b, 0x18, 0x1d, - 0xff, 0x5b, 0x90, 0x02, + 0xff, 0x6c, 0x59, 0x02, + 0xff, 0x59, 0x28, 0x19, + 0xff, 0x59, 0x18, 0x1d, + 0xff, 0x59, 0x90, 0x02, 0x04, 0xa0, 0x2d, 0x1f, 0x00, 0x65, 0x2a, 0x11, 0xff, 0x06, 0x6a, 0x02, @@ -289,11 +289,11 @@ 0xe0, 0x4c, 0x2d, 0x19, 0x20, 0x12, 0x2d, 0x19, 0x20, 0x41, 0x41, 0x00, - 0x5b, 0x6a, 0x3a, 0x17, + 0x59, 0x6a, 0x3a, 0x17, 0xff, 0x3f, 0x64, 0x02, - 0x00, 0x5b, 0x65, 0x06, + 0x00, 0x59, 0x65, 0x06, 0x00, 0x65, 0x2d, 0x13, - 0xff, 0x5b, 0x90, 0x02, + 0xff, 0x59, 0x90, 0x02, 0xff, 0x42, 0x64, 0x02, 0x00, 0xa1, 0x2d, 0x19, 0x20, 0xa0, 0x2d, 0x1f, @@ -341,7 +341,7 @@ 0x40, 0x41, 0x4e, 0x1b, 0x21, 0x6a, 0x91, 0x01, 0xff, 0x65, 0x90, 0x02, - 0xff, 0x5b, 0x64, 0x02, + 0xff, 0x59, 0x64, 0x02, 0x00, 0xb9, 0x56, 0x19, 0x04, 0xa0, 0x60, 0x1b, 0x01, 0x65, 0x65, 0x06, @@ -349,7 +349,7 @@ 0x00, 0x65, 0x52, 0x19, 0x00, 0x6a, 0xad, 0x17, 0x0d, 0x6a, 0x3d, 0x00, - 0x00, 0x5b, 0x77, 0x17, + 0x00, 0x59, 0x77, 0x17, 0xff, 0xa8, 0x5e, 0x1f, 0x10, 0xa0, 0xa0, 0x00, 0x08, 0xa0, 0x4e, 0x1f, --- linux/drivers/scsi/aic7xxx_reg.h.old Mon Sep 22 04:17:35 1997 +++ linux/drivers/scsi/aic7xxx_reg.h Mon Sep 22 04:20:46 1997 @@ -252,18 +252,20 @@ #define CUR_SCBID 0x58 -#define CMDOUTCNT 0x59 +#define ARG_1 0x59 +#define RETURN_1 0x59 +#define SEND_MSG 0x80 +#define SEND_SENSE 0x40 +#define SEND_REJ 0x20 #define SCSICONF 0x5a -#define RESET_SCSI 0x40 -#define FIFODEPTH 0x5a +#define CMDOUTCNT 0x5a -#define ARG_1 0x5b -#define RETURN_1 0x5b -#define SEND_MSG 0x80 -#define SEND_SENSE 0x40 -#define SEND_REJ 0x20 +#define FIFODEPTH 0x5b + +#define SCSICONF2 0x5b +#define RESET_SCSI 0x40 #define HOSTCONF 0x5d --- linux/drivers/scsi/aic7xxx/aic7xxx.reg.old Mon Sep 22 04:17:59 1997 +++ linux/drivers/scsi/aic7xxx/aic7xxx.reg Mon Sep 22 04:20:28 1997 @@ -1079,10 +1079,25 @@ CUR_SCBID { size 1 } + ARG_1 { + size 1 + mask SEND_MSG 0x80 + mask SEND_SENSE 0x40 + mask SEND_REJ 0x20 + alias RETURN_1 + } /* * Running count of commands placed in * the QOUTFIFO. This is cleared by the * kernel driver every FIFODEPTH commands. + * + * NOTE: these scratch RAM registers are *only* used on cards + * that enable SCB paging. The 2742 is unable to page. We + * won't use these on a 2742, and we can't init these registers + * in the kernel driver for 2742 cards because these locations are + * are used by the 2742 cards to control things like bus + * termination. Touching these memory locations is a no-no on all + * non-paging cards as far as we are concerned. */ CMDOUTCNT { size 1 @@ -1094,13 +1109,6 @@ FIFODEPTH { size 1 } - ARG_1 { - size 1 - mask SEND_MSG 0x80 - mask SEND_SENSE 0x40 - mask SEND_REJ 0x20 - alias RETURN_1 - } /* * These are reserved registers in the card's scratch ram. Some of * the values are specified in the AHA2742 technical reference manual @@ -1108,6 +1116,11 @@ */ SCSICONF { address 0x05a + size 1 + bit RESET_SCSI 0x40 + } + SCSICONF2 { + address 0x05b size 1 bit RESET_SCSI 0x40 }