Subject: simple patches for 35401
To: None <port-hp300@netbsd.org>
From: Jarkko Teppo <jarkko.teppo@nfp.fi>
List: port-hp300
Date: 08/06/1999 16:35:32
Hello all!

Here are some simple patches(3 lines!) to ct.c and
ctreg.c to enable detection and simple use of
35401 8-tape jukebox. The drive is based on
9144 and (probably) includes some extensions to
use the tape changer mechanisms. No idea about
those.
I haven't tested this extensively,
tar cfv /dev/rct0 * worked OK.
If anybody could help with the jukebox commands,
that would be very nice...

Anyway, here goes, first the dmesg:


<snip>
Copyright (c) 1996, 1997, 1998
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.3.3 (PRODUCTION) #2: Thu Aug  5 18:42:14 MEST 1999
    jarkko@muuli:/usr/src/sys/arch/hp300/compile/PRODUCTION
HP 9000/380 (25MHz MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches)
cpu: delay divisor 30, mmuid 2
real mem  = 29347840
avail mem = 21712896
using 1023 buffers containing 4190208 bytes of memory
Parity detection enabled
hilconfig: unknown keyboard type 0x16, using default
hil1: US ASCII keyboard
mainbus0 (root)
intio0 at mainbus0
topcat0 at intio0 addr 0x560000: 1280 x 1024 256 color hi-res catseye
display
grf0 at topcat0
ite0 at grf0: console
dio0 at mainbus0: 98620C, 2 channels, 32 bit DMA
nhpib0 at dio0 scode 7 ipl 3: internal HP-IB
hpibbus0 at nhpib0
mt0 at hpibbus0 slave 3 punit 0: 7979A tape
ppi0 at hpibbus0 slave 5 punit 0
ct0 at hpibbus0 slave 6 punit 0: 35401 streaming tape
dca0 at dio0 scode 9 ipl 5: working fifo
oscsi0 at dio0 scode 14 ipl 4: 32 bit dma, async, no parity, scsi id 7
sd0 at oscsi0 targ 0 lun 0: <HP, C2247-300, 0BA4> (SCSI-2)
sd0: 2051 cylinders, 13 heads, 2054864 blocks, 512 bytes/block
sd1 at oscsi0 targ 1 lun 0: <SEAGATE, ST41600N, 0030> (SCSI-2)
sd1: 2099 cylinders, 17 heads, 2676846 blocks, 512 bytes/block
sd2 at oscsi0 targ 2 lun 0: <FUJITSU, M2263S-512, 01A5>
sd2: 1658 cylinders, 15 heads, 1312344 blocks, 512 bytes/block
sd3 at oscsi0 targ 5 lun 0: <SEAGATE, ST31230N, 0640> (SCSI-2)
sd3: 3992 cylinders, 5 heads, 2069860 blocks, 512 bytes/block
dcm0 at dio0 scode 16 ipl 5
le0 at dio0 scode 21 ipl 5: address 08:00:09:07:9b:98
le0: 8 receive buffers, 2 transmit buffers
internal parallel at dio0 scode 23 not configured
fhpib0 at dio0 scode 27 ipl 4: 98625A/98625B HP-IB
hpibbus1 at fhpib0
rd0 at hpibbus1 slave 0 punit 0: 7959B
rd0: 1572 cylinders, 9 heads, 594216 blocks, 512 bytes/block
rd1 at hpibbus1 slave 1 punit 0: 7945A
rd1: 968 cylinders, 7 heads, 108416 blocks, 512 bytes/block
rd2 at hpibbus1 slave 2 punit 0: 7959B
rd2: 1572 cylinders, 9 heads, 594216 blocks, 512 bytes/block
ct1 at hpibbus1 slave 3 punit 0: 9144 streaming tape
rd3 at hpibbus1 slave 4 punit 0: 7959B
rd3: 1572 cylinders, 9 heads, 594216 blocks, 512 bytes/block
ct2 at hpibbus1 slave 5 punit 0: 9145 streaming tape
oscsi1 at dio0 scode 30 ipl 4:async, scsi id 7
sd4 at oscsi1 targ 6 lun 0: <HP, 2213A, C938>
sd4: 1457 cylinders, 16 heads, 1296512 blocks, 512 bytes/block
psl: bio = 0x2400, net = 0x2500, tty = 0x2500, imp = 0x2500
interrupt levels: bio = 4, net = 5, tty = 5
boot device: sd2
root on sd2a dumps on sd2b
mountroot: trying ffs...
root file system type: ffs
init: copying out flags `-s' 3
init: copying out path `/sbin/init' 11
<snap>
The diffs
<snip>

*** ct.c.orig Thu Aug  5 21:18:54 1999
--- ct.c Thu Aug  5 18:41:25 1999
***************
*** 182,187 ****
--- 182,188 ----
   { CT7914PID, 1, "7914P" },
   { CT9144ID, 0, "9144" },
   { CT9145ID, 0, "9145" },
+  { CT35401ID, 0, "35401" },
  };
  int nctinfo = sizeof(ctinfo) / sizeof(ctinfo[0]);

***************
*** 289,294 ****
--- 290,296 ----
     return (0);  /* not really a 7946 */
    /* fall into... */
   case CT9144ID:
+  case CT35401ID:
   case CT9145ID:
    type = CT9144;
    canstream = 1;
=============================================
*** ctreg.h.orig Thu Aug  5 21:19:22 1999
--- ctreg.h Thu Aug  5 18:39:23 1999
***************
*** 133,138 ****
--- 133,139 ----
  #define CT7912PID 0x209
  #define CT7914PID 0x20B
  #define CT88140  1
+ #define CT35401ID 0x270

  /* convert bytes to 1k tape block and back */
  #define CTBTOK(x) ((x) >> 10)



--
Jarkko Teppo
jarkko.teppo@nfp.fi