From owner-freebsd-scsi Wed Jun 30 21:17:19 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 88ABD14D3B for ; Wed, 30 Jun 1999 21:17:17 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id WAA39568; Wed, 30 Jun 1999 22:15:23 -0600 (MDT) (envelope-from ken) Message-Id: <199907010415.WAA39568@panzer.kdm.org> Subject: Re: FreeBSD panics with Mylex DAC960SX In-Reply-To: <199907010257.MAA30296@godzilla.zeta.org.au> from Bruce Evans at "Jul 1, 1999 12:57:43 pm" To: bde@zeta.org.au (Bruce Evans) Date: Wed, 30 Jun 1999 22:15:23 -0600 (MDT) Cc: jgreco@ns.sol.net, wilko@yedi.iaf.nl, scsi@FreeBSD.ORG From: "Kenneth D. Merry" X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Bruce Evans wrote... > >Now, based on some trace printf's I sprinkled in dscheck, it looks to > >me like I get as far as > > > >if (bp->b_bcount % ssp->dss_secsize) > > goto bad_bcount; > > > >around line #191 of kern/subr_diskslice.c. (you can see the "ckpt1c" > >interspersed with other output if you look carefully). It does not > >hit the printf() right after that, so I am guessing that ssp->dss_secsize > >is probably zero. > > Try this "fix" for dsopen(). This should cause open() to fail before the > sector size is used; in particular it should prevent divisions by sector > sizes of 0. I don't know how open() gets so far before the sector size is > known. I don't know either, but I intend to find out. :) In any case, that "fix" might actually be useful to catch pathological cases -- i.e. where the drive doesn't return an error for a read capacity, but the data it returns is bogus. (e.g. sector size of 0) Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message