Subject: NetBSD/Amiga 1.1 SCSI Tape Problems (Long!)
To: None <port-amiga@NetBSD.ORG>
From: Per Bojsen <pb@delta.dk>
List: port-amiga
Date: 03/15/1996 11:20:49
Hi,

I'm running NetBSD 1.1 on an A3000 with an A3070 external tape drive
attached to it.  I experience reproducible lock-ups when reading from
the tape drive.  My guess is the lock-ups are either SCSI bus lock-ups
or deadlocks in the SCSI subsystem of the kernel.  The symptoms are
that the tape drive stops and from that point on no SCSI devices can
be accessed and the system freezes shortly after that.  Interestingly,
the tape drive always stops just after it has reversed its direction,
i.e., when changing tracks (not the end of tape or the end of the file
being read).  Is this a known problem?

Here's some details on my system:

NetBSD 1.1 (MORIA) #15: Sun Mar 10 19:15:18 MET 1996
    root@:/usr/src/sys/arch/amiga/compile/MORIA
Amiga 3000 (m68030 CPU/MMU m68882 FPU)
real  mem = 16777216 (2048 pages)
avail mem = 14704640 (1795 pages)
[...]
grf3 at grfcl0: width 640 height 480 colors 16
ite3 at grf3: rows 60 cols 80 repeat at (30/100)s next at (10/100)s has keyboard
grfcl: 2MB Piccolo being used
grfcl1 at zbus0 rom 0xea0000 man/pro 2195/6
ite at grfcl1:  not configured
ahsc0 at mainbus0
scsibus0 at ahsc0
ahsc0: target 0 now synchronous, period=208ns, offset=12.
ahsc0 targ 0 lun 0: <IBM, DPES-31080, S31Q> SCSI2 0/direct fixed
sd0 at scsibus0: 1034MB, 4903 cyl, 4 head, 108 sec, 512 bytes/sec
ahsc0 targ 1 lun 0: <QUANTUM, LP240S GM240S01X, 4.6> SCSI2 0/direct fixed
sd1 at scsibus0: 234MB, 1818 cyl, 4 head, 65 sec, 512 bytes/sec
ahsc0: target 2 now synchronous, period=208ns, offset=12.
ahsc0 targ 2 lun 0: <IBM, DPES-31080, S31Q> SCSI2 0/direct fixed
sd2 at scsibus0: 1034MB, 4903 cyl, 4 head, 108 sec, 512 bytes/sec
ahsc0 targ 4 lun 0: <CALIPER, CP150, A> SCSI1 1/sequential removable
st0 at scsibus0: drive empty
ahsc0 targ 4 lun 1: <CALIPER, CP150, A> SCSI1 1/sequential removable
st1 at scsibus0: st1(ahsc0:4:1): illegal request, data = 40 00 00 00 00 00
drive empty
ahsc0 targ 4 lun 2: <CALIPER, CP150, A> SCSI1 1/sequential removable
st2 at scsibus0: st2(ahsc0:4:2): illegal request, data = 40 00 00 00 00 00
drive empty
ahsc0 targ 4 lun 3: <CALIPER, CP150, A> SCSI1 1/sequential removable
st3 at scsibus0: st3(ahsc0:4:3): illegal request, data = 40 00 00 00 00 00
drive empty
ahsc0 targ 4 lun 4: <CALIPER, CP150, A> SCSI1 1/sequential removable
st4 at scsibus0: st4(ahsc0:4:4): illegal request, data = 40 00 00 00 00 00
drive empty
ahsc0 targ 4 lun 5: <CALIPER, CP150, A> SCSI1 1/sequential removable
st5 at scsibus0: st5(ahsc0:4:5): illegal request, data = 40 00 00 00 00 00
drive empty
ahsc0 targ 4 lun 6: <CALIPER, CP150, A> SCSI1 1/sequential removable
st6 at scsibus0: st6(ahsc0:4:6): illegal request, data = 40 00 00 00 00 00
drive empty
ahsc0 targ 4 lun 7: <CALIPER, CP150, A> SCSI1 1/sequential removable
st7 at scsibus0: st7(ahsc0:4:7): illegal request, data = 40 00 00 00 00 00
drive empty
[...]

The Caliper drive is the A3070, of course.  Apparently, it doesn't
handle LUNs correctly, by the way.

I tried a number of different commands and came up with the following
set of commands that reproducibly cause the tape drive to lock up the
system:

	1) tar -xvf /dev/rst0
	2) dd if=/dev/rst0 of=file bs=256b
	3) dd if=/dev/rst0 of=file bs=16b
	4) dd if=/dev/rst0 bs=256b | cat > file
	5) dd if=/dev/rst0 of=file bs=256b skip=333

(1) fails after having read about 70MB; (2,4,5) fails after having
read about 43MB; and (3) fails after having read about 20MB.  The tape
I used was a DC6250 250MB tape.  As I mentioned above, the point of
failure is always just after the tape drive reversed direction.

Here are a number of commands which did not lock up the system:

	a) dd if=/dev/rst0 of=/dev/null bs=256b
	b) tar -tvf /dev/rst0 > file
	c) dd if=/dev/rst0 of=file bs=2048b

(c) was my last attempt and what I used to finally get the tar archive
off the tape.

Has anybody experienced problems similar or identical to this?  What
is the suggested fix, if any?  Perhaps a newer kernel will help?

Thanks in advance for any answers!  Apologies for the lengthy message.

-- 
Per Bojsen                                   Email: pb@delta.dk
DELTA IC Design                                     bojsen@moria.home.id.dtu.dk
Venlighedsvej 4, Hoersholm, Denmark