summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2015-03-02 18:09:49 +0000
committerken <ken@FreeBSD.org>2015-03-02 18:09:49 +0000
commita9347ea33012988aa3e83bbd16edec1ba432dfca (patch)
tree3fde598cd23e304dbe3d92267106e7481e93ff9f
parent2f529cb85895ef8cba5b807745f9f20819542240 (diff)
downloadFreeBSD-src-a9347ea33012988aa3e83bbd16edec1ba432dfca.zip
FreeBSD-src-a9347ea33012988aa3e83bbd16edec1ba432dfca.tar.gz
Change the sa(4) driver to check for long position support on
SCSI-2 devices. Some older tape devices claim to be SCSI-2, but actually do support long position information. (Long position information includes the current file mark.) For example, the COMPAQ SuperDLT1. So we now only disable the check on SCSI-1 and older devices. sys/cam/scsi/scsi_sa.c: In saregister(), only disable fetching long position information on SCSI-1 and older drives. Update the comment to explain why. Confirmed by: dvl Sponsored by: Spectra Logic MFC after: 3 weeks
-rw-r--r--sys/cam/scsi/scsi_sa.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/cam/scsi/scsi_sa.c b/sys/cam/scsi/scsi_sa.c
index 52d9b4e..5826caa 100644
--- a/sys/cam/scsi/scsi_sa.c
+++ b/sys/cam/scsi/scsi_sa.c
@@ -2396,9 +2396,13 @@ saregister(struct cam_periph *periph, void *arg)
* Long format data for READ POSITION was introduced in SSC, which
* was after SCSI-2. (Roughly equivalent to SCSI-3.) If the drive
* reports that it is SCSI-2 or older, it is unlikely to support
- * long position data.
+ * long position data, but it might. Some drives from that era
+ * claim to be SCSI-2, but do support long position information.
+ * So, instead of immediately disabling long position information
+ * for SCSI-2 devices, we'll try one pass through sagetpos(), and
+ * then disable long position information if we get an error.
*/
- if (cgd->inq_data.version <= SCSI_REV_2)
+ if (cgd->inq_data.version <= SCSI_REV_CCS)
softc->quirks |= SA_QUIRK_NO_LONG_POS;
if (cgd->inq_data.spc3_flags & SPC3_SID_PROTECT) {
OpenPOWER on IntegriCloud