diff options
author | ken <ken@FreeBSD.org> | 2013-07-12 17:09:50 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2013-07-12 17:09:50 +0000 |
commit | 31c93835352cf3edf67a00b69795f395ef56c8c4 (patch) | |
tree | f43d37cf5bbcdd768708be7b9eff7f667786cb53 /usr.bin/locate/code | |
parent | bb3d14f834904efe9145217161c61a0213244be6 (diff) | |
download | FreeBSD-src-31c93835352cf3edf67a00b69795f395ef56c8c4.zip FreeBSD-src-31c93835352cf3edf67a00b69795f395ef56c8c4.tar.gz |
Fix a problem with READ ELEMENT STATUS that occurs on some
changers that don't support the DVCID and CURDATA bits that were
introduced in the SMC spec.
These changers will return an Illegal Request type error if the
bits are set. This causes "chio status" to fail.
The fix is two-fold. First, for changers that claim to be SCSI-2
or older, don't set the DVCID and CURDATA bits for READ ELEMENT
STATUS. For newer changers (SCSI-3 and newer), we default to
setting the new bits, but back off and try the READ ELEMENT STATUS
without the bits if we get an Illegal Request type error.
This has been tested on a Qualstar TLS-8211, which is a SCSI-2
changer that does not support the new bits, and a Spectra T-380,
which is a SCSI-3 changer that does support the new bits. In the
absence of a SCSI-3 changer that does not support the bits, I
tested that with some error injection code. (The SMC spec says
that support for CURDATA is mandatory, and DVCID is optional.)
scsi_ch.c: Add a new quirk, CH_Q_NO_DVCID that gets set for
SCSI-2 and older libraries, or newer libraries that
report errors when the DVCID/CURDATA bits are set.
In chgetelemstatus(), use the new quirk to
determine whether or not to set DVCID and CURDATA.
If we get an error with the bits set, back off and
try without the bits. Set the quirk flag if the
read element status succeeds without the bits set.
Increase the READ ELEMENT STATUS timeout to 60
seconds after testing with a Spectra T-380. The
previous value was 10 seconds, and too short for
the T-380. This may be decreased later after
some additional testing and investigation.
Tested by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
Sponsored by: Spectra Logic
MFC after: 3 days
Diffstat (limited to 'usr.bin/locate/code')
0 files changed, 0 insertions, 0 deletions