Subject: kern/5647: ARCHIVE, Python: read errors "Incorrect Length Indicator Set"
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sjg@quick.com.au>
List: netbsd-bugs
Date: 06/25/1998 00:08:36
>Number:         5647
>Category:       kern
>Synopsis:       reading tape produces copious "Incorrect Length Indicator Set" errors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 24 07:20:00 1998
>Last-Modified:
>Originator:     Simon J. Gerraty
>Organization:
Zen Programming...
>Release:        1.3
>Environment:
	
System: NetBSD zen.quick.com.au 1.3 NetBSD 1.3 (ZEN) #1: Sun Feb 15 23:38:24 EST 1998 root@zen.quick.com.au:/u0/usr/src/sys/arch/i386/compile/ZEN i386


>Description:
	
After writing a tape say using:

	find . -print | cpio -oac | dd bs=8k of=/dev/rst0

reading the tape (on the same system with the same tape drive)
appears to work, but /var/log/messages is flooded with:

Jun 22 22:14:02 zen /netbsd: st0(aha2:5:0):  Check Condition on opcode 0x8
Jun 22 22:14:02 zen /netbsd:     SENSE KEY:  No Additional Sense
Jun 22 22:14:02 zen /netbsd:                 Incorrect Length Indicator Set
Jun 22 22:14:02 zen /netbsd:    INFO FIELD:  5632
Jun 22 22:14:02 zen /netbsd:      ASC/ASCQ:  No Additional Sense Information

errors.

Using fixed or variable blocksize appears to make no difference.
Enabling or disable compression appears to make no difference.
Note that one cannot easily confirm that mt has affected the drive as
mt status always produces the same output:

: root:140#; mt -f /dev/rst0 blocksize 512
: root:141#; mt -f /dev/rst0 status        
SCSI tape drive, residual=0
ds=0
er=0
blocksize: 0 (0, 0, 0, 0)
density: 19 (0, 0, 0, 0)
: root:142#; mt -f /dev/rst0 blocksize 0   
: root:143#; mt -f /dev/rst0 status      
SCSI tape drive, residual=0
ds=0
er=0
blocksize: 0 (0, 0, 0, 0)
density: 19 (0, 0, 0, 0)

Two Python drives:

st0 at scsibus1 targ 4 lun 0: <ARCHIVE, Python 28454-XXX, 4.44> SCSI2 \
	1/sequential removable
st0: drive empty
st1 at scsibus1 targ 5 lun 0: <ARCHIVE, Python 02779-XXX, 6280> SCSI2 \
	1/sequential removable
st1: density code 0x13, 512-byte blocks, write-enabled

produce the same error.  The 02779-XXX is a brand new drive that
Seagate refer to as an STD64000N, the 28454-XXX is a Sun OEM drive and
has been used for several years without problems on a SunOS system
reading/writing some of the same tapes that on NetBSD produce the
above errors.

Both drives were attached to:

Jun 24 21:54:07 zen /netbsd: aha2 at isa0 port 0x230-0x233 irq 12 drq 7
Jun 24 21:54:07 zen /netbsd: aha2: model AHA-1540A/1542A/1542B, firmware 0.5
Jun 24 21:54:07 zen /netbsd: aha2: sync, no parity
Jun 24 21:54:07 zen /netbsd: scsibus1 at aha2: 8 targets

The internal scsi bus:

Jun 24 21:54:06 zen /netbsd: ahc0 at pci0 dev 13 function 0
Jun 24 21:54:06 zen /netbsd: ahc0: interrupting at irq 11
Jun 24 21:54:06 zen /netbsd: ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs
Jun 24 21:54:06 zen /netbsd: scsibus0 at ahc0 channel 0: 16 targets

has not been tested - not easy to attatch the tape drive to it.

In case it helps, full dmesg output (Python 28454-XXX has been
removed).

Jun 24 21:54:05 zen /netbsd: Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.  All rights reserved.
Jun 24 21:54:05 zen /netbsd: Copyright (c) 1982, 1986, 1989, 1991, 1993
Jun 24 21:54:05 zen /netbsd:     The Regents of the University of California.  All rights reserved.
Jun 24 21:54:05 zen /netbsd: 
Jun 24 21:54:05 zen /netbsd: NetBSD 1.3 (ZEN) #1: Sun Feb 15 23:38:24 EST 1998
Jun 24 21:54:05 zen /netbsd:     root@zen.quick.com.au:/u0/usr/src/sys/arch/i386/compile/ZEN
Jun 24 21:54:05 zen /netbsd: cpu0: family 5 model 2 step c
Jun 24 21:54:05 zen /netbsd: cpu0: Intel Pentium (P54C) (586-class)
Jun 24 21:54:05 zen /netbsd: real mem  = 66715648
Jun 24 21:54:06 zen /netbsd: avail mem = 63934464
Jun 24 21:54:06 zen /netbsd: using 840 buffers containing 3440640 bytes of memory
Jun 24 21:54:06 zen /netbsd: mainbus0 (root)
Jun 24 21:54:06 zen /netbsd: pci0 at mainbus0 bus 0: configuration mode 1
Jun 24 21:54:06 zen /netbsd: pchb0 at pci0 dev 0 function 0
Jun 24 21:54:06 zen /netbsd: pchb0: Intel 82439HX System Controller (TXC) (rev. 0x03)
Jun 24 21:54:06 zen /netbsd: pcib0 at pci0 dev 7 function 0
Jun 24 21:54:06 zen /netbsd: pcib0: Intel 82371SB PCI-to-ISA Bridge (PIIX3) (rev. 0x01)
Jun 24 21:54:06 zen /netbsd: Intel 82371SB IDE Interface (PIIX3) (IDE mass storage, interface 0x80) at pci0 dev 7 function 1 not configured
Jun 24 21:54:06 zen /netbsd: Matrox MGA Millennium 2064W ("Storm") (VGA display, revision 0x01) at pci0 dev 11 function 0 not configured
Jun 24 21:54:06 zen /netbsd: ahc0 at pci0 dev 13 function 0
Jun 24 21:54:06 zen /netbsd: ahc0: interrupting at irq 11
Jun 24 21:54:06 zen /netbsd: ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs
Jun 24 21:54:06 zen /netbsd: scsibus0 at ahc0 channel 0: 16 targets
Jun 24 21:54:06 zen /netbsd: ahc0: target 0 synchronous at 10.0MHz, offset = 0xf
Jun 24 21:54:06 zen /netbsd: sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST32155N, 0594> SCSI2 0/direct fixed
Jun 24 21:54:06 zen /netbsd: sd0: 2049MB, 4177 cyl, 8 head, 125 sec, 512 bytes/sect x 4197405 sectors
Jun 24 21:54:06 zen /netbsd: ahc0: target 1 synchronous at 10.0MHz, offset = 0xf
Jun 24 21:54:06 zen /netbsd: sd1 at scsibus0 targ 1 lun 0: <SEAGATE, ST32151N, 0530> SCSI2 0/direct fixed
Jun 24 21:54:06 zen /netbsd: sd1: 2049MB, 4177 cyl, 8 head, 125 sec, 512 bytes/sect x 4197405 sectors
Jun 24 21:54:06 zen /netbsd: ahc0: target 2 synchronous at 10.0MHz, offset = 0xf
Jun 24 21:54:06 zen /netbsd: sd2 at scsibus0 targ 2 lun 0: <IBM OEM, 0662S12, 3 30> SCSI2 0/direct fixed
Jun 24 21:54:06 zen /netbsd: sd2: 1003MB, 4119 cyl, 5 head, 99 sec, 512 bytes/sect x 2055035 sectors
Jun 24 21:54:06 zen /netbsd: ahc0: target 6 synchronous at 4.0MHz, offset = 0xf
Jun 24 21:54:07 zen /netbsd: cd0 at scsibus0 targ 6 lun 0: <TOSHIBA, XM-5401TASUN4XCD, 3485> SCSI2 5/cdrom removable
Jun 24 21:54:07 zen /netbsd: isa0 at pcib0
Jun 24 21:54:07 zen /netbsd: aha2 at isa0 port 0x230-0x233 irq 12 drq 7
Jun 24 21:54:07 zen /netbsd: aha2: model AHA-1540A/1542A/1542B, firmware 0.5
Jun 24 21:54:07 zen /netbsd: aha2: sync, no parity
Jun 24 21:54:07 zen /netbsd: scsibus1 at aha2: 8 targets
Jun 24 21:54:07 zen /netbsd: st0 at scsibus1 targ 5 lun 0: <ARCHIVE, Python 02779-XXX, 6280> SCSI2 1/sequential removable
Jun 24 21:54:07 zen /netbsd: st0: drive empty
Jun 24 21:54:07 zen /netbsd: ep0 at isa0 port 0x300-0x30f irq 10: 3Com 3C509 Ethernet
Jun 24 21:54:07 zen /netbsd: ep0: MAC address 00:20:af:a4:9b:cf
Jun 24 21:54:07 zen /netbsd: ep0: 8KB byte-wide FIFO, 5:3 Rx:Tx split, utp/aui (default utp)
Jun 24 21:54:07 zen /netbsd: com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
Jun 24 21:54:07 zen /netbsd: com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
Jun 24 21:54:07 zen /netbsd: lpt0 at isa0 port 0x378-0x37b: polled
Jun 24 21:54:07 zen /netbsd: sb: can't map i/o space 0x220/24 in probe
Jun 24 21:54:07 zen /netbsd: npx0 at isa0 port 0xf0-0xff: using exception 16
Jun 24 21:54:06 zen /netbsd: ahc0: target 6 synchronous at 4.0MHz, offset = 0xf
Jun 24 21:54:07 zen /netbsd: cd0 at scsibus0 targ 6 lun 0: <TOSHIBA, XM-5401TASUN4XCD, 3485> SCSI2 5/cdrom removable
Jun 24 21:54:07 zen /netbsd: isa0 at pcib0
Jun 24 21:54:07 zen /netbsd: aha2 at isa0 port 0x230-0x233 irq 12 drq 7
Jun 24 21:54:07 zen /netbsd: aha2: model AHA-1540A/1542A/1542B, firmware 0.5
Jun 24 21:54:07 zen /netbsd: aha2: sync, no parity
Jun 24 21:54:07 zen /netbsd: scsibus1 at aha2: 8 targets
Jun 24 21:54:07 zen /netbsd: st0 at scsibus1 targ 5 lun 0: <ARCHIVE, Python 02779-XXX, 6280> SCSI2 1/sequential removable
Jun 24 21:54:07 zen /netbsd: st0: drive empty
Jun 24 21:54:07 zen /netbsd: ep0 at isa0 port 0x300-0x30f irq 10: 3Com 3C509 Ethernet
Jun 24 21:54:07 zen /netbsd: ep0: MAC address 00:20:af:a4:9b:cf
Jun 24 21:54:07 zen /netbsd: ep0: 8KB byte-wide FIFO, 5:3 Rx:Tx split, utp/aui (default utp)
Jun 24 21:54:07 zen /netbsd: com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
Jun 24 21:54:07 zen /netbsd: com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
Jun 24 21:54:07 zen /netbsd: lpt0 at isa0 port 0x378-0x37b: polled
Jun 24 21:54:07 zen /netbsd: sb: can't map i/o space 0x220/24 in probe
Jun 24 21:54:07 zen /netbsd: npx0 at isa0 port 0xf0-0xff: using exception 16
Jun 24 21:54:07 zen /netbsd: pc0 at isa0 port 0x60-0x6f irq 1: color
Jun 24 21:54:07 zen /netbsd: pc0: console
Jun 24 21:54:07 zen /netbsd: fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
Jun 24 21:54:07 zen /netbsd: fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
Jun 24 21:54:07 zen /netbsd: isapnp0 at isa0 port 0x279: read port 0x203
Jun 24 21:54:07 zen /netbsd: sb1 at isapnp0 port 0x220/16,0x330/2,0x388/4 irq 5 drq 1,5
Jun 24 21:54:07 zen /netbsd: sb1: Creative SB AWE64 PnP Audio: dsp v4.16
Jun 24 21:54:07 zen /netbsd: audio0 at sb1
Jun 24 21:54:07 zen /netbsd: joy0 at isapnp0 port 0x200/8
Jun 24 21:54:07 zen /netbsd: joy0: Creative SB AWE64 PnP Game
Jun 24 21:54:08 zen /netbsd: joy0: joystick not connected
Jun 24 21:54:08 zen /netbsd: isapnp0: <Creative SB AWE64 PnP, CTL0022, , WaveTable> port 0x620/4 not configured
Jun 24 21:54:08 zen /netbsd: isapnp0: <Creative SB AWE64 PnP, CTL2011, PNP0600, IDE> port 0x168/8,0x36e/2 irq 10 not configured
Jun 24 21:54:08 zen /netbsd: biomask 1840 netmask 1c40 ttymask 1c42
Jun 24 21:54:08 zen /netbsd: boot device: sd0
Jun 24 21:54:08 zen /netbsd: root on sd0a dumps on sd0b
Jun 24 21:54:08 zen /netbsd: root file system type: ffs

>How-To-Repeat:
	
Write/read a tape on the Archive Python.
>Fix:
	
None yet.  Though I noted that the "ARCHIVE, Python 28454-XXX" was
listed in the quirks in scsiconf.c, and tried the same entry for the
02779-XXX (before I discovered that the 28454-XXX has the same
problem).

Attempts to put an entry in st.c's quirks table as in:

--- st.c.old    Sun Nov  9 00:25:07 1997
+++ st.c.~2~    Wed Jun 24 00:10:17 1998
@@ -239,6 +239,13 @@
                {0, 0, 0}                               /* minor 12-15 */
        }}},
 #endif
+       {{T_SEQUENTIAL, T_REMOV,
+        "ARCHIVE ", "Python 02779-XXX", ""},     {0, 12, {
+               {0, 0, 0},                              /* minor 0-3 */
+               {0, 0, 0},                              /* minor 4-7 */
+               {0, 0, 0},                              /* minor 8-11 */
+               {0, 0, 0}                               /* minor 12-15 */
+       }}},
 };
 
 #define NOEJECT 0

or 

--- st.c.old    Sun Nov  9 00:25:07 1997
+++ st.c        Wed Jun 24 00:21:11 1998
@@ -239,6 +239,13 @@
                {0, 0, 0}                               /* minor 12-15 */
        }}},
 #endif
+       {{T_SEQUENTIAL, T_REMOV,
+        "ARCHIVE ", "Python 02779-XXX", ""},     {0, 8, {
+               {0, 0, DDS},                            /* minor 0-3 */
+               {0, 0, DDS},                            /* minor 4-7 */
+               {0, 0, DDS},                            /* minor 8-11 */
+               {0, 0, DDS}                             /* minor 12-15 */
+       }}},
 };
 
 #define NOEJECT 0

Simply resulted in 

Jun 24 00:16:10 zen /netbsd: st1(aha2:5:0):  Check Condition on opcode 0x15
Jun 24 00:16:10 zen /netbsd:     SENSE KEY:  Illegal Request
Jun 24 00:16:10 zen /netbsd:      ASC/ASCQ:  Invalid Command Operation Code
Jun 24 00:16:10 zen /netbsd: 
Jun 24 00:16:10 zen /netbsd: st1: cannot set selected mode

errors and a failure to use the drive at all.  So clearly I need to
read up on how/what/why the stuff in st.c works before frobbing it
some more.  Useful pointers appreciated.

>Audit-Trail:
>Unformatted: