Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Sep 2003 21:47:46 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Mark Dixon <mark@markdnet.demon.co.uk>
Cc:        current@freebsd.org
Subject:   Re: LS120, ATANg and Atapicam
Message-ID:  <20030907212417.E13751@delplex.bde.org>
In-Reply-To: <3F5A7970.8000805@markdnet.demon.co.uk>
References:  <3F5A7970.8000805@markdnet.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 7 Sep 2003, Mark Dixon wrote:

> I'm not sure if this is a known problem, but I don't see any references
> to it. I've gone from 5.1-RELEASE to todays CURRENT to try to get rid of
> a different panic (no news on that yet), but I have hit this one.
>
> If I boot my system with no floppy in the LS-120, the system panics
> where atapicam creates da0 for it. If there is a disk in the drive, it
> works fine.
>
> As yet, I havn't got the details of the panic, but if this is of
> interest to anyone here, I will be willing to provide them with them
> (they wil have to be be copied out by hand, so I'm lothe to do it if
> nobody is interested).

I see similar bugs for a 1 ZIP drive 2 CDROM drives.  The panic is mostly
for division by 0 in cam_calc_geometry(), but sometimes there is division
by a garbage value and the error is detected before it causes a panic.
Debugging one of the CDROM drives shows that all SCSI commands done as
part of cdopen() succeed although there is no disk in the drive!   Most of
the commands are reads and the reads are apparently null, leaving garbage
in the buffers.  In particular, the disk geometry is garbage and dividing
by a garbage sector size of 0 causes the panic.  The SCSI commands get
at least as far as ata_completed() (via ata_command() and ata_interrupt()
so they apparently get sent to the drive, but no errors are detected.

For ATAPI drives, there are no problems unless the drives are explicitly
accessed since GEOM doesn't probe them unconditonally.  Panics for the
ZIP drive are deterministic here since GEOM accesses it unconditionally
at boot time when the garbage is more likely to be 0.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030907212417.E13751>