Subject: Troubles with SCSI on my NeXTstation
To: None <port-next68k@netbsd.org>
From: Goran Koruga <goran.koruga@hermes.si>
List: port-next68k
Date: 07/17/2001 15:03:04
Hi all,

I have recently acquired NEXTstation and was happy to see that NetBSD
runs on it. So far I have been using NFS root mount and it worked OK.
Then I have found there are some kernel patches which enable SCSI support
on it and I waited until 1.5.1 was released. Then I have applied these
patches to new kernel. I soon run into problems, so I have downloaded
precompiled 1.5 kernel image from 

ftp://ftp.netbsd.org/pub/NetBSD/arch/next68k/scsi-20001226/netbsd.gz

I get the same errors with both kernels.

Here are some details about it :

1) kernel messages :
done clearing
[ preserving 289016 bytes of netbsd a.out symbol table ]
Copyright (c) 1996, 1997, 1998, 1999, 2000
    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.5 (GENERIC) #28: Tue Dec 26 04:27:33 EST 2000 dbj@rocinante.zlz.net:/u1/netbsd-1-5/src/sys/arch/next68k/compile/GENERIC
NeXT/MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches
total memory = 32760 KB
avail memory = 27076 KB
using 435 buffers containing 1740 KB of memory
mainbus0 (root)
intio0 at mainbus0
esp0 at intio0: ESP100A, 20MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
zsc0 at intio0
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
xe0 at intio0
xe0 at MAC address 00:00:0f:00:fa:02
nextkbd0 at intio0
wskbd0 at nextkbd0: console keyboard
nextdisplay0 at mainbus0: 1152 x 832, 2bpp
wsdisplay0 at nextdisplay0: console (mono, vt100 emulation), using wskbd0
Looks like a MCS1850 (new style) clock chip.
scsibus0: waiting 2 seconds for devices to settle...
esp0: unexpected flushcount 8
scsipi_inqmatch: 2/0/0 <, , >
sd0 at scsibus0 target 1 lun 0: <SAMSUNG, WN32162U, 0100> SCSI2 0/direct fixed
sd0: 2068 MB, 5909 cyl, 4 head, 179 sec, 512 bytes/sect x 4236661 sectors
esp0: unexpected flushcount 8
esp0: unexpected flushcount 8
esp0: unexpected flushcount 8
esp0: unexpected flushcount 8
esp0: unexpected flushcount 8
esp0: unexpected flushcount 8
esp0: unexpected flushcount 8
boot device: xe0
root on xe0
mountroot: trying msdos...
mountroot: trying cd9660...
mountroot: trying nfs...
nfs_boot: trying DHCP/BOOTP
xe0: not multicast capable, IPv6 not enabled
nfs_boot: BOOTP server: 10.17.2.66
nfs_boot: my_addr=10.17.7.136
nfs_boot: my_mask=255.255.0.0
nfs_boot: gateway=10.17.250.250
root on brahma:/next68k
root time: 0x3b54361b
WARNING: clock gained 10037 days
root file system type: nfs
init: copying out path `/sbin/init' 11

2) disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: WN32162U
label: next
flags:
bytes/sector: 512
sectors/track: 179
tracks/cylinder: 4
sectors/cylinder: 716
cylinders: 5909
total sectors: 4230844
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# microseconds
track-to-track seek: 0	# microseconds
drivedata: 0 

4 partitions:
#        size   offset     fstype   [fsize bsize cpg/sgs]
  a:  3968700   262144     4.2BSD        0     0     0   # (Cyl.  366*- 5908)
  b:   262144        0       swap                        # (Cyl.    0 - 366*)
  c:  4230844        0     unused        0     0         # (Cyl.    0 - 5908)
  d:  4230844        0     unused        0     0         # (Cyl.    0 - 5908)

3) what happens when I try to create a fs on the disk
# newfs sd0a
Warning: 88 sector(s) in last cylinder unallocated
/dev/rsd0a:     3968700 sectors in 5543 cylinders of 4 tracks, 179 sectors
        1937.8MB in 347 cyl groups (16 c/g, 5.59MB/g, 1406 i/g)
NDMAP: *intrstat = 0x4000000<SCSI_DMA>
NDMAP: *intrmask = 0xffffffffbc027648<NMI,TIMER,ENETX_DMA,ENETR_DMA,SCSI_DMA,SCC,DSP_4,DISK|C16_VIDEO,SCSI,ENETX,ENETR,DSP_3,KBD_MOUSE>
NDMAP: nd->_nd_map->dm_mapsize = 8160
NDMAP: nd->_nd_map->dm_nsegs = 3
NDMAP: nd->_nd_map->dm_segs[2].ds_addr = 0x04f85000
NDMAP: nd->_nd_map->dm_segs[2].ds_len = 128
NDMAP: nd->_nd_map->dm_segs[2].ds_xfer_len = 305446639
NDMAP: nd->_nd_map_cont->dm_mapsize = 80
NDMAP: nd->_nd_map_cont->dm_nsegs = 1
NDMAP: nd->_nd_map_cont->dm_segs[0].ds_addr = 0x0459b760
NDMAP: nd->_nd_map_cont->dm_segs[0].ds_len = 80
NDMAP: nd->_nd_map_cont->dm_segs[0].ds_xfer_len = 80
NDMAP: dd->dd_csr          = 0xa000000<COMPLETE,SUPDATE>
NDMAP: dd->dd_saved_next   = 0x04f420a0
NDMAP: dd->dd_saved_limit  = 0x04f43000
NDMAP: dd->dd_saved_start  = 0x0459b760
NDMAP: dd->dd_saved_stop   = 0x0459b7b0
NDMAP: dd->dd_next         = 0x04f85080
NDMAP: dd->dd_next_initbuf = 0x04f85080
NDMAP: dd->dd_limit        = 0x04f85080
NDMAP: dd->dd_start        = 0x0459b760
NDMAP: dd->dd_stop         = 0x0459b7b0
NDMAP: interrupt ipl (6) intr(0x4000000<SCSI_DMA>)
panic: DMA Unexpected dma state in interrupt (0xa000000<COMPLETE,SUPDATE>)
Stopped at      _cpu_Debugger+0x6:      unlk    a6

I knwo that my disklabel output may be wrong, I am a new NetBSD user. But
would that really result in DMA issues ?

--

Writing about music is like dancing about architecture.
    -- Frank Zappa