Subject: Re: Problems with ath(4) and interrupt sharing
To: David Laight <david@l8s.co.uk>
From: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
List: port-i386
Date: 12/10/2007 08:50:56
	Hello.  OK, I've patched the auich's interrupt handler to not return
until it is really done servicing all pending requests from the sound card.
This was to insure that the driver could catch up to the device if the
driver lost a number of interrupts from the device.  In that process, I've
discovered, that, in fact, I was getting calls to the interrupt driver
quite fast enough, and, that at some point, the interrupts just ceased, and
it wasn't for lack of servicing by the interrupt handler.
	this makes me wonder if I'm having a hardware issue.  I don't think
the hardware is bad, but I'm wondering if I'm running into some sort of irq
controller programmer bug.
	Below is the dmesg output from the  machine I'm trying to make work.
Notice that dev 0.31 function 5 on irq 11 is listed as being invalid from
the acpi setup routines.  The same is true for dev 1.3, function 0, which
correspond to the two devices I'm having trouble using together.  Given
that I've tried this with NetBSD-4 as well as NetBSD-current, and the
problem is the same, yet the interrupt handling on those two versions is
exceedingly different, I'm wondering if we're mis-programming the irq
controller at startup in such ay way that when both devices begin
generatinginterrupts, the interrupt controller chokes?
	Could someone look at this output and tell me if anyting jumps out at
them as being inherently broken?   I'll fool around with the fixup options,
and see if that makes any difference, but I'm now fairly convinced that my
problem is not either the ath(4) or auich(4) drivers.

Any thoughts would be greatly appreciated.
-thanks
-Brian


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.0_RC5 (GENERIC) #0: Mon Dec 10 08:13:47 PST 2007
	buhrow@lothlorien.nfbcal.org:/usr/local/netbsd/obj/sys/arch/i386/compile/GENERIC
total memory = 510 MB
rbus: rbus_min_start set to 0x40000000
avail memory = 491 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
BIOS32 rev. 0 found at 0xffe90
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Intel Pentium M (Banias) (686-class), 1398.88 MHz, id 0x695
cpu0: features a7e9f9bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,SEP,MTRR>
cpu0: features a7e9f9bf<PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX>
cpu0: features a7e9f9bf<FXSR,SSE,SSE2,TM,SBF>
cpu0: features2 180<EST,TM2>
cpu0: "Intel(R) Pentium(R) M processor 1400MHz"
cpu0: I-cache 32 KB 64B/line 8-way, D-cache 32 KB 64B/line 8-way
cpu0: using thermal monitor 2
cpu0: Enhanced SpeedStep (1484 mV) 1400 MHz
cpu0: Enhanced SpeedStep frequencies available (MHz): 1400 1200 1000 800 600
acpi0 at mainbus0: Advanced Configuration and Power Interface
acpi0: using Intel ACPI CA subsystem version 20060217
acpi0: X/RSDT: OemId <DELL  , CPi R  ,27d5061c>, AslId <ASL ,00000061>
acpi0: SCI interrupting at int 9
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
ACPI-Fast 24-bit timer
mpacpi: could not get bus number, assuming bus 0
LNKA: ACPI: Found matching pin for 0.31.INTA at func 1: 0
LNKB: ACPI: Found matching pin for 0.31.INTB at func 5: 11
LNKB: BIOS IRQ 11 for 0.31.INTB is invalid
LNKA: ACPI: Found matching pin for 0.29.INTA at func 0: 11
LNKD: ACPI: Found matching pin for 0.29.INTB at func 1: 11
LNKC: ACPI: Found matching pin for 0.29.INTC at func 2: 11
LNKH: ACPI: Found matching pin for 0.29.INTD at func 7: 11
LNKA: ACPI: Found matching pin for 0.2.INTA at func 0: 11
LNKD: ACPI: Found matching pin for 1.1.INTA at func 0: 255
LNKD: ACPI: Found matching pin for 1.1.INTA at func 1: 11
LNKB: ACPI: Found matching pin for 1.3.INTA at func 0: 11
LNKB: BIOS IRQ 11 for 1.3.INTA is invalid
LNKC: ACPI: Found matching pin for 1.0.INTA at func 0: 11
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
acpiacad0 at acpi0 (ACPI0003): ACPI AC Adapter
acpibat0 at acpi0 (PNP0C0A-1): ACPI Battery (Control Method)
acpilid0 at acpi0 (PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (PNP0C0C): ACPI Power Button
acpibut1 at acpi0 (PNP0C0E): ACPI Sleep Button
PNP0C01 [System Board] at acpi0 not configured
PNP0A03 [PCI/PCI-X Host Bridge] at acpi0 not configured
PNP0C01 [System Board] at acpi0 not configured
PNP0C01 [System Board] at acpi0 not configured
pckbc1 at acpi0 (PNP0F13): aux port
pckbc1: irq 12
pckbc2 at acpi0 (PNP0303): kbd port
pckbc2: io 0x60,0x64 irq 1
PNP0B00 [AT Real-Time Clock] at acpi0 not configured
attimer1 at acpi0 (PNP0100): AT Timer
attimer1: io 0x40-0x43,0x50-0x53 irq 0
pcppi1 at acpi0 (PNP0800)
pcppi1: io 0x61,0x63,0x65,0x67
pcppi1: children must have an explicit unit
midi0 at pcppi1: PC speaker (CPU-intensive output)
sysbeep0 at pcppi1
PNP0C01 [System Board] at acpi0 not configured
PNP0000 [AT Interrupt Controller] at acpi0 not configured
PNP0200 [AT DMA Controller] at acpi0 not configured
npx1 at acpi0 (PNP0C04)
npx1: io 0xf0-0xff irq 13
npx1: reported by CPUID; using exception 16
PNP0501 [16550A-compatible COM port] at acpi0 not configured
PNP0401 [ECP printer port] at acpi0 not configured
SMCF010 at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C01 [System Board] at acpi0 not configured
acpitz0 at acpi0: ACPI Thermal Zone
acpitz0: unable to get polling interval; using default of 30.0s
acpitz0: passive cooling mode only
acpitz0: critical 99.0C
pckbd0 at pckbc2 (kbd slot)
pckbc2: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc2 (aux slot)
pckbc2: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi1: attached to attimer1
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82855GM Host-Hub Controller (rev. 0x02)
agp0 at pchb0: detected 892k stolen memory
agp0: aperture at 0xf0000000, size 0x8000000
Intel 82855GM GMCH Memory Controller (miscellaneous system, revision 0x02) at pci0 dev 0 function 1 not configured
Intel 82855GM GMCH Configuration Process (miscellaneous system, revision 0x02) at pci0 dev 0 function 3 not configured
vga1 at pci0 dev 2 function 0: Intel 82855GM GMCH Integrated Graphics Device (rev. 0x02)
wsdisplay0 at vga1 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
Intel 82855GM GMCH Integrated Graphics Device (miscellaneous display, revision 0x02) at pci0 dev 2 function 1 not configured
uhci0 at pci0 dev 29 function 0: Intel 82801DB USB UHCI Controller (rev. 0x01)
uhci0: interrupting at irq 11
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 29 function 1: Intel 82801DB USB UHCI Controller (rev. 0x01)
uhci1: interrupting at irq 11
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2 at pci0 dev 29 function 2: Intel 82801DB USB UHCI Controller (rev. 0x01)
uhci2: interrupting at irq 11
usb2 at uhci2: USB revision 1.0
uhub2 at usb2
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0 at pci0 dev 29 function 7: Intel 82801DB USB EHCI Controller (rev. 0x01)
ehci0: interrupting at irq 11
ehci0: BIOS has given up ownership
ehci0: EHCI version 1.0
ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2
usb3 at ehci0: USB revision 2.0
uhub3 at usb3
uhub3: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub3: 6 ports with 6 removable, self powered
ppb0 at pci0 dev 30 function 0: Intel 82801BAM Hub-PCI Bridge (rev. 0x81)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
bge0 at pci1 dev 0 function 0: Broadcom BCM5705M Gigabit Ethernet
bge0: interrupting at irq 11
bge0: ASIC BCM5705 A1 (0x3001), Ethernet address 00:0d:56:xx:xx:xx
bge0: setting short Tx thresholds
brgphy0 at bge0 phy 1: BCM5705 1000BASE-T media interface, rev. 1
brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
cbb0 at pci1 dev 1 function 0: Texas Instruments PCI7510 PCI-CardBus Bridge w/ IEEE 1394 Host Controller (rev. 0x01)
cbb1 at pci1 dev 1 function 1: Texas Instruments PCI7610 PCI-CardBus Bridge (Smart Card mode) (rev. 0x01)
fwohci0 at pci1 dev 1 function 2: Texas Instruments PCI7[4-6]10 IEEE 1394 Host Controller w/ PCI-CardBus Bridge (rev. 0x00)
fwohci0: interrupting at irq 11
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 42:4f:c0:00:1a:xx:xx:xx
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
Texas Instruments product 0x8204 (miscellaneous system) at pci1 dev 1 function 3 not configured
ath0 at pci1 dev 3 function 0LNKB: Picked IRQ 9 with weight 0

ath0: interrupting at irq 9
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: mac 7.8 phy 4.5 radio 5.6
cbb0: interrupting at irq 11
cbb0: secondary bus number uninitialized; try PCI_BUS_FIXUP
cardslot0 at cbb0 slot 0 flags 0
pcmcia0 at cardslot0
cbb1: interrupting at irq 11
cbb1: secondary bus number uninitialized; try PCI_BUS_FIXUP
cardslot1 at cbb1 slot 1 flags 0
pcmcia1 at cardslot1
pcib0 at pci0 dev 31 function 0
pcib0: Intel 82801DB ISA Bridge (rev. 0x01)
piixide0 at pci0 dev 31 function 1
piixide0: Intel 82801DBM IDE Controller (ICH4-M) (rev. 0x01)
piixide0: bus-master DMA support present
piixide0: primary channel configured to compatibility mode
piixide0: primary channel interrupting at irq 14
atabus0 at piixide0 channel 0
piixide0: secondary channel configured to compatibility mode
piixide0: secondary channel interrupting at irq 15
atabus1 at piixide0 channel 1
auich0 at pci0 dev 31 function 5: i82801DB/DBM (ICH4/ICH4M) AC-97 Audio
auich0: interrupting at irq 9
auich0: ac97: SigmaTel STAC9750/51 codec; headphone, 20 bit DAC, 20 bit ADC, SigmaTel 3D
auich0: ac97: ext id 605<AC97_22,AMAP,SPDIF,VRA>
auich1 at pci0 dev 31 function 6: i82801DB (ICH4) AC-97 Modem
auich1: interrupting at irq 9
auich1: ac97: Conexant D480 MDC V.92 Modem codec; no 3D stereo
auich1: ac97: ext mid 4001<LINE1>, secondary codec
auich1: codec not responding, status=0xff00
isa0 at pcib0
lpt0 at isa0 port 0x378-0x37b irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
isapnp0: no ISA Plug 'n Play devices found
WARNING: Callback scheduled before sysmon task queue thread present.
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
ieee1394if0: bus manager 0 (me)
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
auich0: measured ac97 link rate at 47998 Hz, will use 48000 Hz
audio0 at auich0: full duplex, mmap, independent
Kernelized RAIDframe activated
wd0 at atabus0 drive 0: <HITACHI_DK23DA-30>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 28615 MB, 58140 cyl, 16 head, 63 sec, 512 bytes/sect x 58605120 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(piixide0:0:0): using PIO mode 4, Ultra-DMA mode 5 (Ultra/100) (using DMA)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)