Subject: Re: 98658 SCSI adaptor and MI SCSI
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: port-hp300
Date: 10/16/2001 14:29:42
On Sun, Oct 14, 2001 at 07:38:12AM +0900, Izumi Tsutsui wrote:

 > Today I'm playing with MI SCSI driver for 98658 adaptor on HP382.
 > I copy and modify sys/dev/ic/mb89352.c, and it just works
 > with PIO and polling. Now I'm trying to use interrupt, but
 > it does not generate any interrupt on selecting etc.

Cool!

 > According to hp300/dev/scsi.c, it seems that 98658 adaptor
 > does not generate any interrupt and only DIO DMAC can generate it.
 > Does this mean 98658 cannot handle disconnect and timeout etc.
 > and we always have to use polling even it can generate
 > interrupts after each DMA transfers?
 > Or should we write a special driver for it?

Actually, the DIO DMA controller uses its own interrupt to perform
the buffer chaining, but there is handshaking logic between the
Fujitsu SPC and the DIO DMA controller that takes care of the interrupt
at the end of the transfer, it seems.  This handshaking logic also
enables/disables the SPC interrupt line, and indicates if it has
fired.

I have the manual for the SPC chip that is used on the HP SCSI
controller ... but I don't have the manual for the DIO glue that
is attached to that chip -- give me a day or so, and I'll see what
info I can dig up.


 > ---
 > Izumi Tsutsui
 > tsutsui@ceres.dti.ne.jp
 > 
 > >> NetBSD/hp300 Primary Boot, Revision 1.12
 > >> (tsutsui@delica, Wed Oct 10 02:16:00 JST 2001)
 > >> HP 9000/380 SPU
 > >> Enter "reset" to reset system.
 > Boot: [[[sd1a:]netbsd][-a][-c][-d][-s][-v][-q]] :- netbsd.spc -s
 > 1239365+37248+169808 [228512+86140]=0x1b00d0
 > Start @ 0xfe803400 [1=0xfe965218-0x1b00d0]...
 > Entry point: 0xfe803400
 > [ using 315064 bytes of netbsd ELF symbol table ]
 > Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
 >     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.5Y (SPC) #11: Sat Oct 13 23:03:28 JST 2001
 >     tsutsui@mirage:/usr/src/sys/arch/hp300/compile/SPC
 > HP 9000/380 (25MHz MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches)
 > cpu: delay divisor 30, mmuid 11
 > total memory = 24564 KB
 > avail memory = 19708 KB
 > using 332 buffers containing 1328 KB of memory
 > Parity detection enabled
 > hilconfig: unknown keyboard type 0x2, using default
 > hil1: US ASCII keyboard
 > mainbus0 (root)
 > intio0 at mainbus0
 > dio0 at mainbus0: 98620C, 2 channels, 32 bit DMA
 > nhpib0 at dio0 scode 7 ipl 3: internal HP-IB
 > hpibbus0 at nhpib0
 > ppi0 at hpibbus0 slave 5 punit 0
 > dca0 at dio0 scode 9 ipl 5: console, working fifo
 > internal parallel at dio0 scode 12 not configured
 > spc0 at dio0 scode 14 ipl 4
 > scsibus0 at spc0: 8 targets, 8 luns per target
 > le0 at dio0 scode 21 ipl 5: address 08:00:09:18:d8:d2
 > le0: 8 receive buffers, 2 transmit buffers
 > WARNING: select code size unknown for id = 0x39 secid = 0x10
 > device id = 0x39 secid = 0x10 at dio0 scode 132 not configured
 > WARNING: select code size unknown for id = 0x39 secid = 0x10
 > device id = 0x39 secid = 0x10 at dio0 scode 133 not configured
 > WARNING: select code size unknown for id = 0x1 secid = 0x0
 > device id = 0x1 secid = 0x0 at dio0 scode 134 not configured
 > WARNING: select code size unknown for id = 0x1 secid = 0x0
 > device id = 0x1 secid = 0x0 at dio0 scode 135 not configured
 > interrupt levels: bio = 4, net = 5, tty = 5
 > scsibus0: waiting 2 seconds for devices to settle...
 > sd0 at scsibus0 target 0 lun 0: <TEAC, FC-1     HF   07, RV A> SCSI1 0/direct removable
 > sd0: 1280 KB, 80 cyl, 2 head, 32 sec, 256 bytes/sect x 5120 sectors
 > sd1 at scsibus0 target 1 lun 0: <CONNER, CP3500-540MB-3.5, 323> SCSI2 0/direct fixed
 > sd1: 518 MB, 1807 cyl, 12 head, 49 sec, 512 bytes/sect x 1062516 sectors
 > boot device: sd1
 > root on sd1a dumps on sd1b
 > root file system type: ffs
 > Enter pathname of shell or RETURN for sh: 
 > We recommend creating a non-root account and using su(1) for root access.
 > # dd if=/dev/rsd1a of=/dev/null bs=64k
 > ^C193+0 records in
 > 193+0 records out
 > 12648448 bytes transferred in 24.795 secs (510120 bytes/sec)
 > # 

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>