RE: AIC-7XXX 5.0.18 trouble w/ wide devices on narrow channel

Russell Berry (russ@berrex.com)
Sun, 07 Jun 1998 13:16:01 -0400 (EDT)


This message is in MIME format
--_=XFMail.1.3.p0.Linux:980607131601:3697=_
Content-Type: text/plain; charset=us-ascii

Hi Matthias,

I'll convey somethin Doug told me about kind of a reverse problem I had, but I
think may apply.

The no_reset in prior versions was basically just hiding another problem, if
you were to have had a bus reset due to a scsi bus error, or a complainning
scsi periphral cause a bus reset, you may have seen the same problem in the
past. There is a 5.0.19 diff Doug sent me, it fixed my problems, so I'll pass
it along to you. Keep in mind that it doesn't support no_reset anymore, so
take that out of your lilo.conf. In fact, I don't know if you do this or not,
but I have a regular linux boot in lilo.conf in /boot, then I have another
image just in /, with the label linuxtest. So when I build a quesionable
kernel, I still have one to boot from that I know works. I think everyone does
this, but just in case you don't, it's a good idea.

Anyway, here's the diff attached, lemme know if it helps.

---russ

On 07-Jun-98 Matthias Andree wrote:
> Hello everybody,
>
> I patched my Linux 2.0.34 kernel up to AIC-7XXX driver version 5.0.18 and
> encountered a bug.
>
> System configuration:
> Adaptec 2842VL (Narrow Fast SCSI)
>
> SyQuest SQ3270S (Narrow SCSI)
> Plextor PX-32TS (Narrow Ultra SCSI)
> Micropolis 4345WS (Wide Ultra SCSI)
>
> With 5.0.14 (as of plain linux-2.0.34) and aic7xxx=no_reset, everything
> seems to be fine at first glance.
>
> With 5.0.18, the driver properly detects it has a narrow channel VLB host
> adaptor, but negotiates 16-Bit wide transfers with the Micropolis. This must
> fail, since it's an 8 bit wide bus.
>
> Thus, the kernel deletes the corresponding disk entry sda "illegal sector
> size" (something around 16 million) and crashes with an "invalid zero
> pointer dereference", followed by an oops. I cannot currently trace the
> oops, I am setting up the machine for serial console controlled boot-up the
> next days.
>
> Patching aic7xxx_parse_msg to always use 8-Bit transfers did not help
> either, it led to bus resets and kernel panic (since it could not mount its
> root partition).
>
> Regards,
> MA
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu

Immortality -- a fate worse than death.
-- Edgar A. Shoaff

russ@berrex.com

--_=XFMail.1.3.p0.Linux:980607131601:3697=_
Content-Disposition: attachment; filename="aic7xxx-5.0.18-to-19.patch"
Content-Transfer-Encoding: 7bit
Content-Description: aic7xxx-5.0.18-to-19.patch
Content-Type: text/plain;
charset=us-ascii; name=aic7xxx-5.0.18-to-19.patch; SizeOnDisk=1118

--- linux/drivers/scsi/aic7xxx.c-5.0.18 Tue Jun 2 19:36:46 1998
+++ linux/drivers/scsi/aic7xxx.c Thu Jun 4 17:17:52 1998
@@ -209,7 +209,7 @@
0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};

-#define AIC7XXX_C_VERSION "5.0.18"
+#define AIC7XXX_C_VERSION "5.0.19"

#define NUMBER(arr) (sizeof(arr) / sizeof(arr[0]))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
@@ -2301,7 +2301,9 @@
}
#define WIDE_INQUIRY_BITS 0x60
#define SYNC_INQUIRY_BITS 0x10
- if (buffer[7] & WIDE_INQUIRY_BITS)
+ if ( (buffer[7] & WIDE_INQUIRY_BITS) &&
+ (p->needwdtr_copy & (1<<tindex)) &&
+ (p->type & AHC_WIDE) )
{
p->needwdtr |= (1<<tindex);
p->needwdtr_copy |= (1<<tindex);
@@ -3175,7 +3177,7 @@
scsiseq = aic_inb(p, SCSISEQ);
aic_outb(p, scsiseq | SCSIRSTO, SCSISEQ);

- udelay(1000);
+ udelay(5000);

/* Turn off the bus reset. */
aic_outb(p, scsiseq & ~SCSIRSTO, SCSISEQ);
@@ -3185,7 +3187,7 @@
/* Re-enable reset interrupts. */
aic_outb(p, aic_inb(p, SIMODE1) | ENSCSIRST, SIMODE1);

- udelay(1000);
+ udelay(2000);
}

--_=XFMail.1.3.p0.Linux:980607131601:3697=_--
End of MIME message

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu