Date: Mon, 21 Mar 2005 22:50:08 GMT From: "Andrew Bernard" <andrew@hobnob.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/76893: Fatal divide in booting processes with Buslogic BT 958 FW SCSI disk controler. Message-ID: <200503212250.j2LMo83l067482@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/76893; it has been noted by GNATS.
From: "Andrew Bernard" <andrew@hobnob.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:
Subject: Re: kern/76893: Fatal divide in booting processes with Buslogic BT 958 FW SCSI disk controler.
Date: 21 Mar 2005 17:44:04 -0500
Hi,
I've been having the same problem with FreeBSD 5.3 and my BT-958.
It looks like the drive or the BT-958 is returning zero for its
"period factor" for whatever reason. The kernel code in
src/sys/cam/scsi/scsi_all.c doesn't check for this (probably invalid)
case and proceeds to use zero as a divisor at line 2329.
Applying the following patch at line 2302 heads off the divide
by zero and assumes that a "period factor" of zero means
20 mbit/sec SCSI:
2302c2302,2303
< { 0x0c, 5000 } /* FAST-20 */
---
> { 0x0c, 5000 }, /* FAST-20 */
> { 0x00, 5000 } /* FAST-20 */
This enables the drive to come up normally.
I've been using this patch on my home system for about a month
now, with no apparent problems (but use at your own risk!).
I don't know whether it's safe to assume FAST-20 when the
BT-958 returns zero for its "period factor", but I think
that the kernel should at least be checking for a zero divisor
and reporting a device error (instead of bringing the whole
system down on a zero divide fault).
Please let me know if any additional information would be helpful.
Thanks,
Andrew Bernard
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503212250.j2LMo83l067482>
