Subject: ohare interrupt problem (Re: HEADS UP: merging the newlock2 branch)
To: None <macallan@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-macppc
Date: 02/11/2007 04:54:55
In article <e64634ff178420d6d188520ad3e6ae2e@netbsd.org>
macallan@netbsd.org wrote:

> > Though it seems that there are some interrupt problems
> > (lost interrupts or so) even before newlock2 merge.
> 
> Since I've been messing with the interrupt handling lately - could you 
> please give some more detail? The only ohare-based machine I have here 
> is a PowerBook 3400c which doesn't seem to have any interrupt-related 
> troubles (anymore).

During testing rtl8169 driver on my Apus2000 (603ev with Typhoon
(Alchemy variant) based board), TX and RX interrupts from re(4)
seem to stop on heavy load like ttcp.
But once I put any character from serial terminal or hit ADB
keyboard (even on serial console), TX/RX start again.

I'm not sure if this is re(4) related problem or not,
but at least it works fine on i386 and alpha.

With a quick glance your extintr.c changes seems okay,
but I'll check how re(4) works on sources before the change.

---
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    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 4.99.10 (LANCER) #1365: Sun Feb 11 01:16:36 JST 2007
	tsutsui@mirage:/usr/src/sys/arch/macppc/compile/LANCER
total memory = 65536 KB
avail memory = 57800 KB
no active packagefound OHare at 0xf3000000
Handling 32 interrupts
mainbus0 (root)
cpu0 at mainbus0: 603ev (Revision 2.1), ID 0 (primary)
cpu0: HID0 90c001<DOZE,DPM,ICE,DCE,NOPTI>, powersave: 1
cpu0: ohare L2 cache enabled
bandit0 at mainbus0
pci0 at bandit0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer Bandit Host-PCI Bridge (rev. 0x02)
rtk0 at pci0 dev 13 function 0: Realtek 8139 10/100BaseTX (rev. 0x10)
rtk0: interrupting at irq 23
rtk0: Ethernet address 00:48:54:87:ad:9c
rlphy0 at rtk0 phy 7: Realtek internal PHY
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
re0 at pci0 dev 14 function 0: RealTek 8169S Single-chip Gigabit Ethernet
re0: interrupting at irq 25
re0: Ethernet address 00:0d:0b:4b:af:1b
rgephy0 at re0 phy 7: RTL8169S/8110S 1000BASE-T media interface, rev. 0
rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
obio0 at pci0 dev 16 function 0: addr 0xf3000000
mesh0 at obio0 offset 0x10000 irq 12: 50MHz, SCSI ID 7
scsibus0 at mesh0: 8 targets, 8 luns per target
zsc0 at obio0: irq 15,16
zstty0 at zsc0 channel 0 (console i/o)
zstty1 at zsc0 channel 1
awacs at obio0 offset 0x14000 not configured
swim3 at obio0 offset 0x15000 not configured
nvram0 at obio0 offset 0x60000
adb0 at obio0 offset 0x16000 irq 18: 1 targets
aed0 at adb0 addr 0: ADB Event device
akbd0 at adb0 addr 2: extended keyboard
wskbd0 at akbd0 mux 1
wdc0 at obio0 offset 0x20000 irq property not found; using 13: DMA transfer
atabus0 at wdc0 channel 0
scsibus0: waiting 2 seconds for devices to settle...
cd0 at scsibus0 target 3 lun 0: <MATSHITA, CD-ROM CR-506, 8S05> cdrom removable
wd0 at atabus0 drive 0: <IBM-DTTA-350840>
wd0: 8063 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 16514064 sectors
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
---
Izumi Tsutsui