public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ACPI and broken PCI IRQ sharing on Asus M5N laptop
@ 2004-05-10  0:44 Patrick Reynolds
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick Reynolds @ 2004-05-10  0:44 UTC (permalink / raw)
  To: linux-kernel

I posted yesterday about how the built-in psmouse in my Asus M5N (M5200N)
laptop is broken under recent 2.6 kernels.  I believe I have tracked the
problem down to broken IRQ sharing.  It's broken under 2.6.2 through
2.6.6-rc3-bk11, but it works fine under 2.6.1.

Booting with default parameters puts the i8042 psmouse channel, the Intel
8x0 sound card, and the Cardbus controller all on IRQ 12.  The mouse is
almost unusable, sampling 3-4 times per second.  The sound works fine.  In
/proc/interrupts I get
   12:      310     XT-PIC  i8042, Intel 82801DB-ICH4, yenta
The interrupt count goes up when I play MP3s, but not when I move the
mouse.

Booting with acpi=noirq (or acpi=off or pci=noacpi under 2.6.5) makes the
mouse work, but breaks several other devices, including sound.  From
dmesg:
  PCI: Probing PCI hardware
  PCI: Using IRQ router default [8086/24cc] at 0000:00:1f.0
  PCI: IRQ 0 for device 0000:00:1f.1 doesn't match PIRQ mask - try pci=usepirqmask
  PCI: IRQ 0 for device 0000:00:1f.5 doesn't match PIRQ mask - try pci=usepirqmask
  PCI: IRQ 0 for device 0000:00:1f.6 doesn't match PIRQ mask - try pci=usepirqmask
  PCI: IRQ 0 for device 0000:01:03.0 doesn't match PIRQ mask - try pci=usepirqmask
  PCI: IRQ 0 for device 0000:01:03.1 doesn't match PIRQ mask - try pci=usepirqmask
[snip]
  PCI: Enabling device 0000:00:1f.5 (0005 -> 0007)
  PCI: IRQ 0 for device 0000:00:1f.5 doesn't match PIRQ mask - try pci=usepirqmask
  PCI: No IRQ known for interrupt pin B of device 0000:00:1f.5. Please try using pci=biosirq.
  unable to grab IRQ 0
  Intel ICH: probe of 0000:00:1f.5 failed with error -16
In this case, /proc/interrupts shows only the i8042 on IRQ 12, and the
interrupt count increments as expected (about 75/sec) when I move the
mouse.

Enabling pci=biosirq didn't help.  Sound still didn't work:
  PCI: Enabling device 0000:00:1f.5 (0005 -> 0007)
  PCI: IRQ 0 for device 0000:00:1f.5 doesn't match PIRQ mask - try pci=usepirqmask
  PCI: No IRQ known for interrupt pin B of device 0000:00:1f.5.
  unable to grab IRQ 0
  Intel ICH: probe of 0000:00:1f.5 failed with error -16

Finally, enabling pci=biosirq and pci=usepirqmask together didn't help
either.  It got rid of a few warnings (basically anything telling me to
try biosirq or usepirqmask!), but the sound still couldn't get an
IRQ:
  PCI: Enabling device 0000:00:1f.5 (0005 -> 0007)
  PCI: No IRQ known for interrupt pin B of device 0000:00:1f.5.
  unable to grab IRQ 0
  Intel ICH: probe of 0000:00:1f.5 failed with error -16

So I'm stuck with either sound or mouse, but not both at once unless I
roll back to 2.6.1.  Any ideas?

I've put my dmesg from my last 5 reboots here:
  http://www.cs.duke.edu/~reynolds/dmesg2.txt

Here's the output of lspci -v:
  http://www.cs.duke.edu/~reynolds/pci.txt

In case it's an ACPI issue, here's my DSDT:
  http://www.cs.duke.edu/~reynolds/dsdt.bin

--Patrick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ACPI and broken PCI IRQ sharing on Asus M5N laptop
       [not found] <A6974D8E5F98D511BB910002A50A6647615FAF02@hdsmsx403.hd.intel.com>
@ 2004-05-10  2:47 ` Len Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Len Brown @ 2004-05-10  2:47 UTC (permalink / raw)
  To: Patrick Reynolds; +Cc: linux-kernel

On Sun, 2004-05-09 at 20:44, Patrick Reynolds wrote:
> I posted yesterday about how the built-in psmouse in my Asus M5N
> (M5200N)
> laptop is broken under recent 2.6 kernels.  I believe I have tracked
> the
> problem down to broken IRQ sharing.  It's broken under 2.6.2 through
> 2.6.6-rc3-bk11, but it works fine under 2.6.1.
> 
> Booting with default parameters puts the i8042 psmouse channel, the
> Intel
> 8x0 sound card, and the Cardbus controller all on IRQ 12.  The mouse
> is
> almost unusable, sampling 3-4 times per second.  The sound works
> fine.  In
> /proc/interrupts I get
>    12:      310     XT-PIC  i8042, Intel 82801DB-ICH4, yenta
> The interrupt count goes up when I play MP3s, but not when I move the
> mouse.

try booting with "acpi_irq_isa=12"

ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 12) *0, disabled.

ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 12

There are 3 BIOS bugs here:
1. LNKB is marked disabled, yet referenced
Linux handes this

2. Current Setting for LNKB is not in possible setting list
Linux handles -- though apparently this fixes some systems
and breaks others.

3. IRQ12 marked as a viable IRQ for sharing sound and mouse
Linux falls for this hook, line, and sinker.

I'd be interested to see your dmesg and /proc/interrupts from 2.6.1

thanks,
-Len



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ACPI and broken PCI IRQ sharing on Asus M5N laptop
       [not found] <A6974D8E5F98D511BB910002A50A6647615FAF0D@hdsmsx403.hd.intel.com>
@ 2004-05-10  3:33 ` Len Brown
  2004-05-10  5:07   ` Patrick Reynolds
  0 siblings, 1 reply; 5+ messages in thread
From: Len Brown @ 2004-05-10  3:33 UTC (permalink / raw)
  To: Patrick Reynolds; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On Sun, 2004-05-09 at 22:47, Brown, Len wrote:
> On Sun, 2004-05-09 at 20:44, Patrick Reynolds wrote:

> >    12:      310     XT-PIC  i8042, Intel 82801DB-ICH4, yenta

> 
> try booting with "acpi_irq_isa=12"
> 
> ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 12) *0, disabled.
> 
> ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 12

On the assumption that cmdline works, please try this patch
(without any cmdline param).

It simply tweaks the heuristic and makes IRQ12 less attractive compared
to the others.

thanks,
-Len


[-- Attachment #2: pci_link.patch --]
[-- Type: text/plain, Size: 1301 bytes --]

===== drivers/acpi/pci_link.c 1.28 vs edited =====
--- 1.28/drivers/acpi/pci_link.c	Thu May  6 16:03:17 2004
+++ edited/drivers/acpi/pci_link.c	Sun May  9 23:16:48 2004
@@ -478,7 +478,7 @@
 	PIRQ_PENALTY_PCI_AVAILABLE,	/* IRQ9  PCI, often acpi */
 	PIRQ_PENALTY_PCI_AVAILABLE,	/* IRQ10 PCI */
 	PIRQ_PENALTY_PCI_AVAILABLE,	/* IRQ11 PCI */
-	PIRQ_PENALTY_ISA_TYPICAL,	/* IRQ12 mouse */
+	PIRQ_PENALTY_ISA_USED,	/* IRQ12 mouse */
 	PIRQ_PENALTY_ISA_USED,	/* IRQ13 fpe, sometimes */
 	PIRQ_PENALTY_ISA_USED,	/* IRQ14 ide0 */
 	PIRQ_PENALTY_ISA_USED,	/* IRQ15 ide1 */
@@ -545,17 +545,23 @@
 		if (link->irq.active == link->irq.possible[i])
 			break;
 	}
+	/*
+	 * forget active IRQ that is not in possible list
+	 */
+	if (i == link->irq.possible_count) {
+		if (acpi_strict)
+			printk(KERN_WARNING PREFIX "_CRS %d not found"
+				" in _PRS\n", link->irq.active);
+		link->irq.active = 0;
+	}
 
 	/*
 	 * if active found, use it; else pick entry from end of possible list.
 	 */
-	if (i != link->irq.possible_count) {
+	if (link->irq.active) {
 		irq = link->irq.active;
 	} else {
 		irq = link->irq.possible[link->irq.possible_count - 1];
-		if (acpi_strict)
-			printk(KERN_WARNING PREFIX "_CRS %d not found"
-				" in _PRS\n", link->irq.active);
 	}
 
 	if (acpi_irq_balance || !link->irq.active) {

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ACPI and broken PCI IRQ sharing on Asus M5N laptop
  2004-05-10  3:33 ` Len Brown
@ 2004-05-10  5:07   ` Patrick Reynolds
  2004-05-10 15:25     ` Franklin Marmon
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Reynolds @ 2004-05-10  5:07 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-kernel

On Sun, 9 May 2004, Len Brown wrote:

> On Sun, 2004-05-09 at 20:44, Patrick Reynolds wrote:
> > Booting with default parameters puts the i8042 psmouse channel, the
> > Intel
> > 8x0 sound card, and the Cardbus controller all on IRQ 12.  The mouse
> try booting with "acpi_irq_isa=12"

That worked.  The interrupts got redistributed like so:
  6:        172          XT-PIC  Intel 82801DB-ICH4, yenta
  7:       3014          XT-PIC  uhci_hcd, yenta, ndiswrapper
  8:          4          XT-PIC  rtc
  9:        188          XT-PIC  acpi
 12:       1028          XT-PIC  i8042

> I'd be interested to see your dmesg and /proc/interrupts from 2.6.1

It piles the sound and cardbus onto IRQ 5, along with a USB that I'm
actually using.  For some reason it doesn't touch IRQ 6.  Here are dmesg
and /proc/interrupts from 2.6.1, 2.6.6 w/ acpi_irq_isa=12, and 2.6.6 w/
your patch:

http://www.cs.duke.edu/~reynolds/acpi-notes

On Sun, 9 May 2004, Len Brown wrote:

> On the assumption that cmdline works, please try this patch
> (without any cmdline param).
>
> It simply tweaks the heuristic and makes IRQ12 less attractive compared
> to the others.

That also worked and produced the same IRQ mapping as acpi_irq_isa=12.

Thanks!  If you want any more logs, etc, let me know.

--Patrick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ACPI and broken PCI IRQ sharing on Asus M5N laptop
  2004-05-10  5:07   ` Patrick Reynolds
@ 2004-05-10 15:25     ` Franklin Marmon
  0 siblings, 0 replies; 5+ messages in thread
From: Franklin Marmon @ 2004-05-10 15:25 UTC (permalink / raw)
  To: Patrick Reynolds; +Cc: Len Brown, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]

I'm having a similar problem on a eMachine M6805.  When booting with
pci=noacpi my ethernet and firewire drivers are on different (working)
irq's than they get when booting without it.  I've attached more
detailed info to the message, but was just wondering if there was a
document showing the different acpi_xxx options? Or if you could point
me in the right place to find them?

Thank you,

frm

On Sun, 2004-05-09 at 23:07, Patrick Reynolds wrote:
> On Sun, 9 May 2004, Len Brown wrote:
> 
> > On Sun, 2004-05-09 at 20:44, Patrick Reynolds wrote:
> > > Booting with default parameters puts the i8042 psmouse channel, the
> > > Intel
> > > 8x0 sound card, and the Cardbus controller all on IRQ 12.  The mouse
> > try booting with "acpi_irq_isa=12"
> 
> That worked.  The interrupts got redistributed like so:
>   6:        172          XT-PIC  Intel 82801DB-ICH4, yenta
>   7:       3014          XT-PIC  uhci_hcd, yenta, ndiswrapper
>   8:          4          XT-PIC  rtc
>   9:        188          XT-PIC  acpi
>  12:       1028          XT-PIC  i8042
> 
> > I'd be interested to see your dmesg and /proc/interrupts from 2.6.1
> 
> It piles the sound and cardbus onto IRQ 5, along with a USB that I'm
> actually using.  For some reason it doesn't touch IRQ 6.  Here are dmesg
> and /proc/interrupts from 2.6.1, 2.6.6 w/ acpi_irq_isa=12, and 2.6.6 w/
> your patch:
> 
> http://www.cs.duke.edu/~reynolds/acpi-notes
> 
> On Sun, 9 May 2004, Len Brown wrote:
> 
> > On the assumption that cmdline works, please try this patch
> > (without any cmdline param).
> >
> > It simply tweaks the heuristic and makes IRQ12 less attractive compared
> > to the others.
> 
> That also worked and produced the same IRQ mapping as acpi_irq_isa=12.
> 
> Thanks!  If you want any more logs, etc, let me know.
> 
> --Patrick
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

[-- Attachment #2: pci_data --]
[-- Type: text/plain, Size: 2966 bytes --]

###############################################################################
#
# consistant elements

#
# lspci -v
#

00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
        Subsystem: VIA Technologies, Inc. VT6102 [Rhine II] Embeded Ethernet 
                   Controller on VT8235
        Flags: bus master, medium devsel, latency 64, IRQ 9
        I/O ports at 1800 [size=256]
        Memory at d0002c00 (32-bit, non-prefetchable) [size=256]
        Capabilities: <available only to root>


###############################################################################
# 
# normal operation
#   kernel parameters include pci=noacpi
#


#
# /var/log/messages
#
  Apr 27 08:03:16 laptop kernel: PCI: Sharing IRQ 9 with 0000:00:12.0


#
# cat /proc/interupts
#
           CPU0
  0:     102200          XT-PIC  timer
  1:        146          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  8:          1          XT-PIC  rtc
  9:       2712          XT-PIC  uhci_hcd, eth0
 10:        178          XT-PIC  acpi, uhci_hcd, VIA8233
 11:          0          XT-PIC  uhci_hcd
 12:        588          XT-PIC  i8042
 14:       8752          XT-PIC  ide0
 15:        964          XT-PIC  ide1
NMI:          0
ERR:          0



###############################################################################
#
# next step, removed pci=noacpi from the kernel parameters
#


#
# errors which occured when bringing up my ethernet interface (shown above)
# when booted without pci=noacpi
#

eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
irq 9: nobody cared!
Call Trace:
 [<c010bb2a>] __report_bad_irq+0x2a/0x90
 [<c010bc1c>] note_interrupt+0x6c/0xb0
 [<c010c1a9>] do_IRQ+0x259/0x340
 [<c010c0de>] do_IRQ+0x18e/0x340
 [<c010a158>] common_interrupt+0x18/0x20
 [<c0210e1a>] acpi_processor_idle+0xd5/0x1c7
 [<c01070bc>] cpu_idle+0x2c/0x40
 [<c03c6701>] start_kernel+0x181/0x1c0
 [<c03c6430>] unknown_bootoption+0x0/0x120
 
handlers:
[<e0aad630>] (usb_hcd_irq+0x0/0x70 [usbcore])
[<e0958780>] (snd_via82xx_interrupt+0x0/0x400 [snd_via82xx])
Disabling IRQ #9

# 
# lspci -v is identical to the one above
#

# 
# cat /proc/interupts
#
           CPU0
  0:     323327          XT-PIC  timer
  1:       1223          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  8:          1          XT-PIC  rtc
  9:     100000          XT-PIC  uhci_hcd, VIA8233
 10:       1227          XT-PIC  acpi, uhci_hcd
 11:          0          XT-PIC  uhci_hcd, eth0
 12:      25710          XT-PIC  i8042
 14:       7832          XT-PIC  ide0
 15:       5416          XT-PIC  ide1
NMI:          0
ERR:          0


###############################################################################
# 
# results
#

Notice that when allowing acpi to assign the irq's eth0 is on irq11, when 
turning of acpi for pci devices it is on irq 9.  The other device which is 
'off' is VIA8233 (should be 10, is put on 9 under acpi).  

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-05-10 15:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <A6974D8E5F98D511BB910002A50A6647615FAF02@hdsmsx403.hd.intel.com>
2004-05-10  2:47 ` ACPI and broken PCI IRQ sharing on Asus M5N laptop Len Brown
     [not found] <A6974D8E5F98D511BB910002A50A6647615FAF0D@hdsmsx403.hd.intel.com>
2004-05-10  3:33 ` Len Brown
2004-05-10  5:07   ` Patrick Reynolds
2004-05-10 15:25     ` Franklin Marmon
2004-05-10  0:44 Patrick Reynolds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox