]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r253274 and r253368:
authorken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 15 Jul 2013 18:02:26 +0000 (18:02 +0000)
committerken <ken@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 15 Jul 2013 18:02:26 +0000 (18:02 +0000)
commit2b62625c0b7863abae3a21c1d6b6f6be7d12cf21
treec910aab329bbd9655c2837dd96790be7bde5c9ad
parent664fd4f3aeda67e6c8aa8dc46aef24763ed21c33
MFC r253274 and r253368:

  r253274 | ken | 2013-07-12 11:09:50 -0600 (Fri, 12 Jul 2013) | 40 lines

  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

  ------------------------------------------------------------------------
  r253368 | ken | 2013-07-15 10:38:48 -0600 (Mon, 15 Jul 2013) | 5 lines

  Fix an argument reversal in calls to scsi_read_element_status().

  Reported by: Ulrich Spoerlein <uqs@FreeBSD.org>

Approved by: re (kib)

git-svn-id: svn://svn.freebsd.org/base/stable/9@253369 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cam/scsi/scsi_ch.c