Subject: kern/13603: Tandberg SLR/5 fails to create multi-file tape
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rmcm@compsoft.com.au>
List: netbsd-bugs
Date: 07/30/2001 17:23:29
>Number:         13603
>Category:       kern
>Synopsis:       Tandberg SLR/5 fails to create multi-file tape
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 30 17:20:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Rex McMaster
>Release:        NetBSD 1.5
>Organization:
rmcm@compsoft.com.au
>Environment:
NetBSD fellini.mcmaster.wattle.id.au 1.5 NetBSD 1.5 (fellini) #3: Fri May 11 07:55:50 EST 2001 root@fellini.mcmaster.wattle.id.au:/usr/src/sys/arch/i386/compile/fellini i386
>Description:
Tandberg SLR/5 tape unit does not handle multi-file tape writes. This
has been repeated with 2 different units, and has been repeated by
Tandberg support. The scsi error is;

  Jun 28 13:37:50 gw /netbsd: st0(ahc1:5:0):  Check Condition on CDB: 0x0a 01 00 00 14 00
  Jun 28 13:37:50 gw /netbsd:     SENSE KEY:  Illegal Request
  Jun 28 13:37:50 gw /netbsd:    INFO FIELD:  20
  Jun 28 13:37:50 gw /netbsd:      ASC/ASCQ:  Write Append Error

The dmesg entry is;

st0 at scsibus0 target 5 lun 0: <TANDBERG, SLR5 4/8GB, =09:> SCSI2 1/sequential removable
>How-To-Repeat:
# mt rewind
# dump -0 -f /dev/nrst0 /tmp/testtape/d1
  DUMP: Dumping sub files/directories from /tmp
  DUMP: Dumping file/directory /tmp/testtape/d1
  DUMP: Date of this level 0 dump: Wed Jul  4 17:40:40 2001
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping a subset of /dev/rsd0e (a subset of /tmp) to /dev/nrst0
  DUMP: Label: none
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 4684 tape blocks on 0.12 tape(s).
  DUMP: Volume 1 started at: Wed Jul  4 17:40:40 2001
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: 4678 tape blocks on 1 volume
  DUMP: Volume 1 completed at: Wed Jul  4 17:40:52 2001
  DUMP: Volume 1 took 0:00:12
  DUMP: Volume 1 transfer rate: 389 KB/s
  DUMP: Date of this level 0 dump: Wed Jul  4 17:40:40 2001
  DUMP: Date this dump completed:  Wed Jul  4 17:40:52 2001
  DUMP: Average transfer rate: 389 KB/s
  DUMP: Closing /dev/nrst0
  DUMP: DUMP IS DONE
# dump -0 -f /dev/nrst0 /tmp/testtape/d2
  DUMP: Dumping sub files/directories from /tmp
  DUMP: Dumping file/directory /tmp/testtape/d2
  DUMP: Date of this level 0 dump: Wed Jul  4 17:44:26 2001
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping a subset of /dev/rsd0e (a subset of /tmp) to /dev/nrst0
  DUMP: Label: none
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 4684 tape blocks on 0.12 tape(s).
  DUMP: Volume 1 started at: Wed Jul  4 17:44:26 2001
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: End of tape detected
  DUMP: Closing /dev/nrst0
  DUMP: Volume 1 completed at: Wed Jul  4 17:44:26 2001
  DUMP: Change Volumes: Mount volume #2
  DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") no
  DUMP: Do you want to abort?: ("yes" or "no") yes
  DUMP: The ENTIRE dump is aborted.
# tail /var/log/messages
Jul  4 17:44:26 install /netbsd: st0(ahc2:5:0):  Check Condition on CDB: 0x10 00 00 00 02 00
Jul  4 17:44:26 install /netbsd:     SENSE KEY:  Illegal Request
Jul  4 17:44:26 install /netbsd:    INFO FIELD:  2
Jul  4 17:44:26 install /netbsd:      ASC/ASCQ:  Write Append Error
Jul  4 17:44:26 install /netbsd:
Jul  4 17:44:26 install /netbsd: st0(ahc2:5:0):  Check Condition on CDB: 0x10 00 00 00 02 00
Jul  4 17:44:26 install /netbsd:     SENSE KEY:  Illegal Request
Jul  4 17:44:26 install /netbsd:    INFO FIELD:  2
Jul  4 17:44:26 install /netbsd:      ASC/ASCQ:  Write Append Error
Jul  4 17:44:26 install /netbsd:

>Fix:
This patch to the quirks table in /usr/src/sys/dev/scsipi/st.c 
fixes the problem.

*** st.c.orig   Sat Nov  4 05:46:30 2000
--- st.c        Sun Jul 22 13:23:45 2001
***************
*** 156,159 ****
--- 156,166 ----
                {0, 0, QIC_120}                         /* minor 12-15 */
        }}},
+       {{T_SEQUENTIAL, T_REMOV,
+        "TANDBERG", " SLR5 4/8GB     ", ""},     {0, 0, {
+               {ST_Q_FORCE_BLKSIZE, 1024, 0},          /* minor 0-3 */
+               {0, 0, 0},                              /* minor 4-7 */
+               {0, 0, 0},                              /* minor 8-11 */
+               {0, 0, 0}                               /* minor 12-15 */
+       }}},
        /*
         * lacking a manual for the 4200, it's not clear what the
>Release-Note:
>Audit-Trail:
>Unformatted: