[1721] in linux-scsi channel archive
Iomega ZIP drive + MEDIUM_ERROR equals dead Linux box
daemon@ATHENA.MIT.EDU (campbell@tirian.che.curtin.edu.au)
Fri Apr 18 06:01:42 1997
From: campbell@tirian.che.curtin.edu.au
To: linux-scsi@vger.rutgers.edu
Date: Fri, 18 Apr 1997 17:59:27 +0000
Introduction
===================================================
I am the maintainer for the "curtin" version of the Iomega parallel
port ZIP drive linux device driver. (ie: Grant Guenther's work + EPP
support + support for most parallel ports).
Until recently I have concentrated on the hardware specifics of the
device driver (ie: getting the kernel to talk to the drive regardless
of the parallel port chipset). But this has changed as of Linux
2.1.33 when the parport (parallel port device) manager became part of
the kernel, suddenly my experimental driver went main stream. Now
people expect me to be a SCSI protocol expert....
Problem 1 / 3
===================================================
I have had several reports indicating that when the ZIP drive
encounters a bad sector the kernel corrupts, hangs, dumps piles of
kernel messages, resets, or all of the above.
I have personally have not seen this happen (I don't have a disk with
a bad sector to emulate the problem with).
1) Does anyone know what is going on here?
2) What is the correct method for handling SCSI errors (from a low
level driver point of view)?
Is the driver meant to do anything other than collect the return code and
pass it to the next level up?
3) Can anyone give me a translation of the following dmesg extract?
> Disc change detected.
> SCSI device sda: hdwr sector= 512 bytes. Sectors= 196608 [96 MB] [0.1 GB]
> sda: Write Protect is off
> sda: sda1
> scsi0: MEDIUM ERROR on channel 0, id 6, lun 0, CDB: 0x03 00 00 00 10 00
> Current error sd08:01: sns = f0
> ASC=16 ASCQ= 0
> Raw sense data:0xf0 0x00 0x03 0x00 0x01 0x4c 0xb4 0x11 0x00 0x00 0x00 0x00 0x16 0x00 0x00 0x00
> scsidisk I/O error: dev 08:01, sector 85140
> MEDIUM ERROR on channel 0, id 6, lun 0, CDB: 0x03 00 00 00 10 00
> Current error sd08:01: sns = f0
> ASC=16 ASCQ= 0
> Raw sense data:0xf0 0x00 0x03 0x00 0x01 0x4c 0xb4 0x11 0x00 0x00 0x00 0x00 0x16 0x00 0x00 0x00
> scsidisk I/O error: dev 08:01, sector 85140
This cycled for approx 40 lines.
I can determine there is a bad sector at 85140, is there anything
else that can be determined from the sense buffer?
Problem 2 / 3
===================================================
I require a small SCSI command which I can use for testing port
parameters. This command needs to be simple (ie just a byte array
that I send down to the drive) and the result easily interpreted.
When an error occurs it may result in duplicated data being read back
or consist of null bytes (ie 0x00 0x00 0x00 0x00 0x00 .... )
Any suggestions most welcome.
Problem 3 / 3
===================================================
Does anyone know a SCSI command to enable/disable hardware read
verify after write. I know that this feature exists as I have used it
on a Novell server which by default enables this option, it is
usefull when you need to dump a huge amount of data which isn't too
critical.
I know that what I am asking amounts to a reduction of data
security... especially when removable disks are dodgy as a storage
medium to start with. I have someone who is willing to take this risk
as they are using a ZIP drive for data transport purposes and they are
concerned about the CPU load required to write data (90+% for writes,
<10% for reads).
Any help with the above questions most appreciated.
David Campbell