Bug 678

Summary: ACPI VIA KT400, VT6102 interrupt assignment issue
Product: ACPI Reporter: Jurriaan Kalkman (thunder7)
Component: Config-InterruptsAssignee: Len Brown (lenb)
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: blocking CC: acpi-bugzilla, davej, john.stultz, Marko.Macek, robbe, thunder7, zwane
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.5.63-2.6.0-test4 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 845    
Attachments: dmesg of 2.5.69 kernel with acpi and apic
dmesg of 2.5.69 kernel without acpi with apic
decompiled ASL file for DSDT of this Epox 8K9A3+ motherboard
lspci -vv output
/proc/interrupts for 2.5.75 with ACPI and IO-APIC
dmesg output for 2.5.75 with ACPI and IO-APIC
dmesg output of 2.6.0-test4 kernel with ACPI and IO-APIC
/proc/interrupts output for 2.6.0-test4 + APIC + IO-APIC
ACPI fixes for VIA chipsets
dmesg of 2.6.0-test4 with the patch applied

Description Jurriaan Kalkman 2003-05-08 02:18:27 UTC
Distribution: Debian Unstable
Hardware Environment: Epox 8K9A3+ with most recent BIOS, VIA KT-400 + VT6102
network on-board
Software Environment: Debian Unstable
Problem Description:

This bug also happened with earlier kernels, at least back to 2.5.63. Before
that, no kernels were tested. I'll describe what happens with 2.5.69.

A kernel with acpi and local ioapic compiled in boots, but sees only 16 out of
24 interrupts in the local apic. The onboard network (VIA VT6102) uses one of
the 8 lost interrupts and doesn't work. USB not tested due to missing USB devices.
Booting with 'pci=noacpi' or 'acpi=biosirq' doesn't help.

A kernel with acpi and no local ioapic compiled in doesn't boot, hangs after
probing the second ide-controller at ide15: 'ide1 at 0x170-0x177,0x376 on irq
15' is the last line before the system hangs.

Without ACPI, the local ioapic works perfectly, and the onboard network also.

dmesg with acpi on:

Processor #0 6:8 APIC version 16
ACPI: LAPIC_NMI (acpi_id[0x00] polarity[0x1] trigger[0x1] lint[0x1])
ACPI: IOAPIC (id[0x02] address[0xfec00000] global_irq_base[0x0])
IOAPIC[0]: Assigned apic_id 2
IOAPIC[0]: apic_id 2, version 3, address 0xfec00000, IRQ 0-23
Enabling APIC mode:  Flat.  Using 1 I/O APICs
init IO_APIC IRQs
 IO-APIC (apicid-pin) 2-0, 2-16, 2-17, 2-18, 2-19, 2-20, 2-21, 2-22, 2-23 not
connected.
..TIMER: vector=0x31 pin1=2 pin2=0
number of MP IRQ sources: 16.
number of IO-APIC #2 registers: 24.

dmesg with acpi off:
I/O APIC #2 Version 17 at 0xFEC00000.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
ENABLING IO-APIC IRQs
Setting 2 in the phys_id_present_map
...changing IO-APIC physical APIC ID to 2 ... ok.
init IO_APIC IRQs
 IO-APIC (apicid-pin) 2-0, 2-5, 2-10, 2-11, 2-20 not connected.
..TIMER: vector=0x31 pin1=2 pin2=0
number of MP IRQ sources: 24.
number of IO-APIC #2 registers: 24.


Steps to reproduce:
compile kernel-2.5.69 with ACPI and local ioapic
boot on Epox 8K9A3+ system board

Various files (dmesg, /proc/interrupts, dsdt etc) gladly available on request.
Comment 1 Jurriaan Kalkman 2003-05-08 02:19:25 UTC
Created attachment 318 [details]
dmesg of 2.5.69 kernel with acpi and apic
Comment 2 Jurriaan Kalkman 2003-05-08 02:20:36 UTC
Created attachment 319 [details]
dmesg of 2.5.69 kernel without acpi with apic
Comment 3 Jurriaan Kalkman 2003-05-08 02:22:36 UTC
Created attachment 320 [details]
decompiled ASL file for DSDT of this Epox 8K9A3+ motherboard
Comment 4 Jurriaan Kalkman 2003-05-08 02:23:44 UTC
Created attachment 321 [details]
lspci -vv output
Comment 5 Dave Jones 2003-05-08 13:25:59 UTC
This is very likely the cause of bug #10, bug #71, bug #399 and bug #599
Comment 6 Andy Grover 2003-05-08 13:35:52 UTC
I don't believe so. I think this is just an error in the dmesg output. ACPI 
does support >15 irqs but it only fills in the mp_irqs array for legacy irqs.

I don't know if we want to make this bug the task of fixing things so this 
confusing dmesg output is corrected, or what.
Comment 7 Jurriaan Kalkman 2003-05-08 21:39:53 UTC
Andrew Grover comments that only the dmesg-output is faulty, but the system is
using the higher interrupts.

Still, my network card isn't working, and this part of dmesg looks not right:

ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 *5 6 7 10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 10 *11 12 14 15)
pci_link-0256 [17] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [ALKA] (IRQs 20, disabled)
pci_link-0256 [19] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [ALKB] (IRQs 21, disabled)
pci_link-0256 [21] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [ALKC] (IRQs 22, disabled)
pci_link-0256 [23] acpi_pci_link_get_curr: No IRQ resource found
ACPI: PCI Interrupt Link [ALKD] (IRQs 23, disabled)

Later on, the VT6102 network-adapter seems to get IRQ 5:

pci_link-0502 [23] acpi_pci_link_get_irq : Link disabled
 pci_irq-0256 [22] acpi_pci_irq_lookup   : Invalid IRQ link routing entry
 pci_irq-0295 [22] acpi_pci_irq_derive   : Unable to derive IRQ for device 00:12
.0
ACPI: No IRQ known for interrupt pin A of device 00:12.0
eth0: VIA VT6102 Rhine-II at 0xde002000, 00:04:61:02:0e:ea, IRQ 5.
eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 45e1.

but it doesn't show in /proc/interrupts:

           CPU0       
  0:    7451442    IO-APIC-edge  timer
  1:        403    IO-APIC-edge  i8042
  2:          0          XT-PIC  cascade
  4:          8    IO-APIC-edge  serial
  8:          4    IO-APIC-edge  rtc
  9:          0    IO-APIC-edge  acpi
 11:          0    IO-APIC-edge  VIA8233
 12:         63    IO-APIC-edge  i8042
 14:       9161    IO-APIC-edge  ide0
 15:       1906    IO-APIC-edge  ide1
 17:       1507   IO-APIC-level  ide2, ide4
 18:         53   IO-APIC-level  sym53c8xx
 19:          0   IO-APIC-level  EMU10K1
NMI:          0 
LOC:    7451640 
ERR:          0
MIS:          0

and consequently, doesn't work:

NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0003, PHY status 786d, resetting...
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.

without acpi, the VT6102 gets interrupt 23 and works fine:

           CPU0       
  0:     754463    IO-APIC-edge  timer
  1:       1916    IO-APIC-edge  i8042
  2:          0          XT-PIC  cascade
  4:          8    IO-APIC-edge  serial
  8:          4    IO-APIC-edge  rtc
 12:      41371    IO-APIC-edge  i8042
 14:      35646    IO-APIC-edge  ide0
 15:      15935    IO-APIC-edge  ide1
 17:      33022   IO-APIC-level  ide2, ide4
 18:         43   IO-APIC-level  sym53c8xx
 19:          0   IO-APIC-level  EMU10K1
 22:          0   IO-APIC-level  VIA8233
 23:      23246   IO-APIC-level  eth0
NMI:          0 
LOC:     754395 
ERR:          0
MIS:          0
Comment 8 Jurriaan Kalkman 2003-05-27 23:33:32 UTC
No change in linux-2.5.70
Comment 9 Jurriaan Kalkman 2003-06-15 00:29:28 UTC
Still present in 2.5.71.
Comment 10 Jurriaan Kalkman 2003-06-17 01:03:25 UTC
no change in 2.5.72
Comment 11 Jurriaan Kalkman 2003-07-03 00:12:35 UTC
No change in 2.5.74.
Comment 12 Jurriaan Kalkman 2003-07-11 11:51:19 UTC
Something changed in 2.5.75: I still get 

NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0003, PHY status 786d, resetting...
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.

in my dmesg output, and the on-board network doesn't work.

However, it seems to have gotten an interrupt now, according to /proc/interrupts:

  5:          0    IO-APIC-edge  uhci-hcd, eth0

I'll add a new dmesg and /proc/interrupts from 2.5.75.



Comment 13 Jurriaan Kalkman 2003-07-11 11:52:08 UTC
Created attachment 505 [details]
/proc/interrupts for 2.5.75 with ACPI and IO-APIC
Comment 14 Jurriaan Kalkman 2003-07-11 11:52:41 UTC
Created attachment 506 [details]
dmesg output for 2.5.75 with ACPI and IO-APIC
Comment 15 Jurriaan Kalkman 2003-08-09 12:22:52 UTC
And after I celebrated it's 3-month-anniversary, the bug is still present in
2.6.0-test3.
Comment 16 Luming Yu 2003-08-24 20:39:32 UTC
It looks like a duplicate bug of #10. In that case, 2.6.0-test4 can work with
ACPI + USB + Network - IOAPIC. Are you sure (ACPI + USB + network + IOAPIC)
failed?  Only usb get broken there.
Comment 17 Jurriaan Kalkman 2003-08-26 02:28:09 UTC
I am sure that 2.6.0-test4 doesn't work with ACPI + APIC together. It's different from earlier kernels, but both my onboard soundcard and my onboard network are disabled. I can't find a mention of them in the dmesg output, but they do exist in the .config.
Comment 18 Jurriaan Kalkman 2003-08-26 02:29:49 UTC
Created attachment 736 [details]
dmesg output of 2.6.0-test4 kernel with ACPI and IO-APIC
Comment 19 Jurriaan Kalkman 2003-08-26 02:30:51 UTC
Created attachment 737 [details]
/proc/interrupts output for 2.6.0-test4 + APIC + IO-APIC
Comment 20 Jun Nakajima 2003-08-26 16:43:34 UTC
Thanks for the data. We understood what's happening, and we are working on it 
now.

Comment 21 Nicolas Mailhot 2003-08-31 14:16:32 UTC
Please check if bug #10 fix works for you
Comment 22 Jurriaan Kalkman 2003-08-31 23:22:05 UTC
due to an off-line vacation, I'm not able to test patches or answer questions
until sept 16.
Comment 23 Andrew de Quincey 2003-09-07 14:11:03 UTC
Created attachment 833 [details]
ACPI fixes for VIA chipsets
Comment 24 Andrew de Quincey 2003-09-07 14:12:03 UTC
Please try the newly attached patch; it should fix VIA IRQ problems 
Comment 25 Jurriaan Kalkman 2003-09-14 01:10:18 UTC
Created attachment 888 [details]
dmesg of 2.6.0-test4 with the patch applied
Comment 26 Jurriaan Kalkman 2003-09-14 01:11:33 UTC
My problems are fixed by the patch provided.

Thanks!

Jurriaan
Comment 27 Jurriaan Kalkman 2003-10-26 08:49:06 UTC
solved in 2.6.0-test9, boots with acpi and working network without any patches.