Re: LS120, ATANg and Atapicam

From: Bruce Evans <bde_at_zeta.org.au>
Date: Sun, 7 Sep 2003 21:47:46 +1000 (EST)
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
Received on Sun Sep 07 2003 - 02:47:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:21 UTC