kern/103602: drive gets wedged on READ CD CAPACITY if no disc
is in
Josh Carroll
josh.carroll at gmail.com
Wed Apr 4 04:07:07 UTC 2007
Thinking out of the box, I decided to use sg3_utils on both the
semi-working 7.0-CURRENT kernel I had, and on a Linux Knoppix 5.1 live
CD.
Pretty much every sg utility resulted in a acd0 FAILURE message (I ran
the commands against /dev/cd0 though of course). Here are the various
dmesg messages:
acd0: FAILURE - INQUIRY timed out
acd0: FAILURE - MODE_SENSE_BIG timed out
acd0: FAILURE - READ_CAPACITY timed out
acd0: FAILURE - SEND_KEY timed out
acd0: FAILURE - unknown CMD (0x46) timed out
It seems like every atapi command is timing out when I boot without a
disc in the drive. The only command that semi-worked was sg_turs.
Without a CD in the drive, I get the following output:
test unit ready cdb: 00 00 00 00 00 00
test unit ready: Probably uninitialized data.
Try to view as SCSI-1 non-extended sense:
AdValid=0 Error class=0 Error code=0
Raw sense data (in hex):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
If I insert a CD and run it, I get normal output (e.g. matching that
of what I saw on Knoppix):
test unit ready cdb: 00 00 00 00 00 00
Perhaps there is a subtle difference with TUR with and without a disc,
which the kernel can sense and take appropriate action? When running
any of these sg* commands in Knoppix with no disc in the drive, I get
a message similar to this:
sg_readcap.no_disc.out:READ CAPACITY (10) failed, device not ready
Interestingly, the sg_vpd command fails to read the serial # as well,
so that is definitely a known bug with this drive I think. Here is the
sg_vpd output on Knoppix:
Supported VPD pages VPD page:
fetching VPD page failed
I don't know if the output of any of these sg commands on Knoppix is
useful (e.g. sg_get_config, sg_modes, sginfo) in terms of finding out
details of the device, but if interested I've posted a tarball of the
outputs here:
http://pflog.net/floyd/sg_output.tgz
Anyway, I thought some of this might be useful. At least I hope :)
Josh
More information about the freebsd-scsi
mailing list