Subject: pdcsata in CURRENT netbsd/sparc64
To: None <port-sparc64@NetBSD.org>
From: Lars Nordlund <lars.nordlund@hem.utfors.se>
List: port-sparc64
Date: 08/04/2006 01:17:13
Hello

So I have been struggling to get this machine usable:

console is sun-keyboard/display
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
    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 3.99.24 (TALISKER) #1: Thu Aug  3 22:35:40 CEST 2006
        lars@glengoyne.nordlund:/home/lars/tmp/obj_sparc64/sys/arch/sparc64/compile/TALISKER
total memory = 256 MB
avail memory = 237 MB
timecounter: Timecounters tick every 10.000 msec
bootpath: /pci@1f,0/pci@1,1/ide@3,0/disk@0,0
mainbus0 (root): SUNW,Ultra-5_10: hostid 80a7208b
cpu0 at mainbus0: SUNW,UltraSPARC-IIi @ 300 MHz, version 0 FPU
cpu0: 32K instruction (32 b/l), 16K data (32 b/l), 512K external (64 b/l)
cpu0: upa id 0
psycho0 at mainbus0 addr 0xfffc4000
SUNW,sabre: impl 0, version 0: ign 7c0 bus range 0 to 2; PCI bus 0
DVMA map: c0000000 to e0000000
IOTSB: 426000 to 4a6000
pci0 at psycho0
pci0: i/o space, memory space enabled
ppb0 at pci0 dev 1 function 1: Sun Microsystems Simba PCI bridge (rev. 0x11)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
ebus0 at pci1 dev 1 function 0
ebus0: Sun Microsystems PCIO Ebus2, revision 0x01
auxio0 at ebus0 addr 726000-726003, 728000-728003, 72a000-72a003, 72c000-72c003, 72f000-72f003
power at ebus0 addr 724000-724003 ipl 37 not configured
SUNW,pll at ebus0 addr 504000-504002 not configured
se at ebus0 addr 400000-40007f ipl 43 not configured
com0 at ebus0 addr 3083f8-3083ff ipl 41: ns16550a, working fifo
com0: console
kbd0 at com0 (console input)
com1 at ebus0 addr 3062f8-3062ff ipl 42: ns16550a, working fifo
ms0 at com1
wsmouse0 at ms0 mux 0
lpt0 at ebus0 addr 3043bc-3043cb, 30015c-30015d, 700000-70000f ipl 34
fdthree at ebus0 addr 3023f0-3023f7, 706000-70600f, 720000-720003 ipl 39 not configured
clock0 at ebus0 addr 0-1fff: mk48t59
flashprom at ebus0 addr 0-fffff not configured
audiocs0 at ebus0 addr 200000-2000ff, 702000-70200f, 704000-70400f, 722000-722003 ipl 35 ipl 36: CS4231A
audio0 at audiocs0: full duplex
hme0 at pci1 dev 1 function 1: Sun Happy Meal Ethernet, rev. 1
hme0: interrupting at ivec 3021
hme0: Ethernet address 08:00:20:a7:20:8b
nsphy0 at hme0 phy 1: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
machfb0 at pci1 dev 2 function 0: ATI Technologies 3D Rage I/II (rev. 0x9a)
machfb0: 16 MB aperture at 0xe1000000, 4 KB registers at 0x00000000
machfb0: 2048 KB SGRAM 62.999 MHz, maximum RAMDAC clock 170 MHz
mach64_get_mode: 1152 5304 5432 1528 900 902 938 937
machfb0: initial resolution 1152x864 at 8 bpp
machfb0: attached to /dev/fb0
machfb0: initializing the DSP
wsdisplay1 at machfb0 kbdmux 1
wsmux1: connecting to wsdisplay1
wsdisplay1: screen 0-3 added (default)
cmdide0 at pci1 dev 3 function 0
cmdide0: CMD Technology PCI0646 (rev. 0x03)
cmdide0: bus-master DMA support present
cmdide0: primary channel configured to native-PCI mode
cmdide0: using ivec 1820 for native-PCI interrupt
atabus0 at cmdide0 channel 0
cmdide0: secondary channel configured to native-PCI mode
atabus1 at cmdide0 channel 1
ppb1 at pci0 dev 1 function 0: Sun Microsystems Simba PCI bridge (rev. 0x11)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled
pdcsata0 at pci2 dev 2 function 0
pdcsata0: Promise PDC40718 SATA300 controller (rev. 0x02)
pdcsata0: interrupting at ivec 14
pdcsata0: bus-master DMA support present
atabus2 at pdcsata0 channel 0
atabus3 at pdcsata0 channel 1
atabus4 at pdcsata0 channel 2
atabus5 at pdcsata0 channel 3
ffb0 at mainbus0 addr 0xfebee000: Creator3D, model SUNW,501-4788, dac 10
machfb0: moved to /dev/fb1
ffb0: attached to /dev/fb0
wsdisplay0 at ffb0 kbdmux 1: console (sunffb, sun emulation)
wsmux1: connecting to wsdisplay0
wsdisplay0: screen 1-3 added (sunffb, sun emulation)
pcons at mainbus0 not configured
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: selected timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "tick-counter" frequency 300000000 Hz quality 100
timecounter: selected timecounter "tick-counter" frequency 300000000 Hz quality 100
No counter-timer -- using %tick at 300MHz as system clock.
wskbd0 at kbd0: console keyboard, using wsdisplay0
Kernelized RAIDframe activated
wd0 at atabus0 drive 0: < 128M>
wd0: drive supports 1-sector PIO transfers, LBA addressing
wd0: 122 MB, 978 cyl, 8 head, 32 sec, 512 bytes/sect x 250368 sectors
wd0: drive supports PIO mode 4
wd0(cmdide0:0:0): using PIO mode 4
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <CRD-8240B, 1997/12/08, 1.24> cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2
cd0(cmdide0:1:0): using PIO mode 4, DMA mode 2 (using DMA)
wd1 at atabus5 drive 0: <SAMSUNG HD300LJ>
wd1: drive supports 16-sector PIO transfers, LBA48 addressing
wd1: 279 GB, 581421 cyl, 16 head, 63 sec, 512 bytes/sect x 586072368 sectors
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 7
wd1(pdcsata0:3:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
root on wd1a dumps on wd1b
root file system type: ffs
wsdisplay0: screen 4 added (sunffb, sun emulation)
pdcsata0:3:0: lost interrupt
        type: ata tc_bcount: 10240 tc_skip: 0
pdcsata0:3:0: lost interrupt
        type: ata tc_bcount: 40960 tc_skip: 0
pdcsata0:3:0: lost interrupt
        type: ata tc_bcount: 10240 tc_skip: 0


lost interrupt? Is there anything that can be done about that? Some
delay() somewhere that can be increased? What I am wondering is if the
interrupts are really lost, or just a tad late?

Reading between the lines in a 2-3 year old posting on a netbsd-list, it
looked like it could be a weak power supply causing the loss of
interrupts? Any comments on that? My guess is that the power should be
enough. I have removed the old harddrive and replaced it with a compact
flash drive in a flash<->ide converter.

pdcsata manages to reset itself and get back in the game. No problem
there. It is just that the machine hangs for a few seconds while it is
happening. Sometimes I am able to use the machine several minutes
without a single lost interrupt, but other times it is so bad that it
can barely boot up.

One time when it was really bad with lost interrupts I also got a
watchdog reset. (Taking a trap while traps are off, I suppose?
Whatever that really means..)

I have tested the pdcsata in a 3.99.23 netbsd/i386 and it worked like a
charm.

Hmm, reading through the dmesg now makes me realise that I have not
used the first available sata port, but the last. Something to move
around the next time I open the machine. Also going to try other PCI
slots to make the rain dance complete..

Tonight I tried both ubuntu sparc linux 6.06 and opensolaris nv-b44,
but neither could get past their boot loaders. It could be because I
forgot to write the CDs in 1x, if that matters..


Best regards,
	Lars Nordlund