Subject: audio lockup on Dell laptop
To: None <tech-kern@netbsd.org>
From: Cliff Wright <cliff@snipe444.org>
List: tech-kern
Date: 04/27/2007 09:11:52
On my Dell laptop Inspiron 8500, audio would only work on short
files. Playing of long files would result in audio locking up.
Looking at the dmesg I saw some interrupt problems.
LNKB: ACPI: Found matching pin for 0.31.INTB at func 5: 11
LNKB: BIOS IRQ 11 for 0.31.INTB is invalid
This is the interrupt used by the auich audio.
Later in dmesg it showed irq 9 being assigned to the audio.
However using pcictl dump, the PCI register was set for the
bios assigned irq of 11.
The invalid was occurring because the ACPI tables showed only
interrupt 5, and 7 in the list of possible interrupts.
Yet with no APIC, the interrupt routing for the PCI to IRQ is
only setup by bios, not the O/S, so must be used, and assumed valid.
I removed the call to the subroutine that checked if the bios
assigned interrupt was in the ACPI supplied list, then the
audio worked fine. I think since NetBSD does not setup any
interrupt routing when their is no APIC, that the bios setting
must be trusted over the ACPI info.
Patch is included below for 4.0 beta2 cvs version 1.7
I have not done a send-pr yet, as I am not sure if this is the
right approach.

--- /usr/src/sys/dev/acpi/acpi_pci_link.c.orig	2007-04-24 13:28:11.000000000 -0700
+++ /usr/src/sys/dev/acpi/acpi_pci_link.c	2007-04-26 19:49:01.000000000 -0700
@@ -661,10 +661,7 @@
 	}
 
 	/* Validate the BIOS IRQ. */
-	if (!link_valid_irq(link, bios_irq)) {
-		printf("%s: BIOS IRQ %u for %d.%d.INT%c is invalid\n",
-		    sc->pl_name, bios_irq, (int)bus, slot, pin + 'A');
-	} else if (!PCI_INTERRUPT_VALID(link->l_bios_irq)) {
+	if (!PCI_INTERRUPT_VALID(link->l_bios_irq)) {
 		link->l_bios_irq = bios_irq;
 		if (bios_irq < NUM_ISA_INTERRUPTS)
 			pci_link_bios_isa_irqs |= (1 << bios_irq);