Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #2335 (new defect)

Opened 12 years ago

irq request problem when multiple wifi interfaces share IRQ line

Reported by: nenad@panline.net Assigned to:
Priority: minor Milestone:
Component: madwifi: driver Version: trunk
Keywords: Cc:
Patch is attached: 1 Pending: 0

Description

When there are multiple wifi cards sharing same IRQ line, after loading ath_pci kernel complains with this:

ACPI: PCI Interrupt Link [APC4] enabled at IRQ 19
ath_pci 0000:01:07.0: PCI INT A -> Link[APC4] -> GSI 19 (level, high) -> IRQ 19
[drm] Initialized drm 1.1.0 20060810
pci 0000:03:00.0: PCI INT A -> Link[APC4] -> GSI 19 (level, high) -> IRQ 19
[drm] Initialized radeon 1.29.0 20080528 on minor 0
parport_pc 00:0c: reported by Plug and Play ACPI
parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE,EPP]
MadWifi: ath_attach: Switching rfkill capability off.
wifi0: Atheros AR2413 chip found (MAC 7.8, PHY 2112A 4.5, Radio 5.6)
ath_pci: wifi0: Atheros 2413: mem=0xe1110000, irq=19
ACPI: PCI Interrupt Link [APC1] enabled at IRQ 16
ath_pci 0000:01:08.0: PCI INT A -> Link[APC1] -> GSI 16 (level, high) -> IRQ 16
MadWifi: ath_attach: Switching rfkill capability off.
wifi1: Atheros AR2413 chip found (MAC 7.8, PHY 2112A 4.5, Radio 5.6)
ath_pci: wifi1: Atheros 2413: mem=0xe1100000, irq=16
ath_pci 0000:02:08.0: PCI INT A -> Link[APC3] -> GSI 18 (level, high) -> IRQ 18
MadWifi: ath_attach: Switching rfkill capability off.
wifi2: Atheros AR5213A chip found (MAC 5.9, PHY 2112 4.3, Radio 3.6)
ath_pci: wifi2: Atheros 5212: mem=0xe0000000, irq=18
ath_pci 0000:02:09.0: PCI INT A -> Link[APC4] -> GSI 19 (level, high) -> IRQ 19
proc_dir_entry '19/wifi%d' already registered
Pid: 1016, comm: modprobe Not tainted 2.6.27.21-170.2.56.commuth.2.i586 #1
 [<c04b3041>] proc_register+0xbc/0x11a
 [<c04b3222>] proc_mkdir_mode+0x2f/0x43
 [<c04b3245>] proc_mkdir+0xf/0x11
 [<c04597db>] register_handler_proc+0xe6/0xf4
 [<c04582d3>] setup_irq+0x231/0x2a5
 [<d0a4c959>] ? ath_intr+0x0/0xe84 [ath_pci]
 [<c0458433>] request_irq+0xec/0x10a
 [<d0a56660>] ath_pci_probe+0x1f4/0x339 [ath_pci]
 [<c0512777>] pci_device_probe+0x39/0x5b
 [<c057e033>] driver_probe_device+0xb7/0x131
 [<c057e0e7>] __driver_attach+0x3a/0x59
 [<c057d8a9>] bus_for_each_dev+0x39/0x5e
 [<c057dec1>] driver_attach+0x14/0x16
 [<c057e0ad>] ? __driver_attach+0x0/0x59
 [<c057dc35>] bus_add_driver+0x90/0x1b7
 [<c05044e0>] ? kset_find_obj+0x1b/0x43
 [<c057e25f>] driver_register+0x71/0xcc
 [<c0512905>] __pci_register_driver+0x38/0x67
 [<d08ae01d>] init_ath_pci+0x1d/0x2d [ath_pci]
 [<c040112d>] _stext+0x3d/0x115
 [<d08ae000>] ? init_ath_pci+0x0/0x2d [ath_pci]
 [<c0443fe5>] sys_init_module+0x87/0x17a
 [<c0403af2>] syscall_call+0x7/0xb
 =======================
MadWifi: ath_attach: Switching rfkill capability off.
wifi3: Atheros AR5213A chip found (MAC 5.9, PHY 2112 4.3, Radio 3.6)
ath_pci: wifi3: Atheros 5212: mem=0xe0010000, irq=19
ACPI: PCI Interrupt Link [APC2] enabled at IRQ 17
ath_pci 0000:02:0b.0: PCI INT A -> Link[APC2] -> GSI 17 (level, high) -> IRQ 17
MadWifi: ath_attach: Switching rfkill capability off.
wifi4: Atheros AR5413 chip found (MAC 10.4, PHY SChip 6.1, Radio 6.3)
ath_pci: wifi4: Atheros 5413: mem=0xe0020000, irq=17

IRQ allocation is like this:

# cat /proc/interrupts
           CPU0
  0:        152   IO-APIC-edge      timer
  1:          2   IO-APIC-edge      i8042
  4:        516   IO-APIC-edge      serial
  6:          2   IO-APIC-edge
  7:          0   IO-APIC-edge      parport0
  8:          0   IO-APIC-edge      rtc0
  9:          0   IO-APIC-fasteoi   acpi
 14:     152251   IO-APIC-edge      pata_amd
 15:          0   IO-APIC-edge      pata_amd
 16:  360457987   IO-APIC-fasteoi   wifi1
 17:  345872691   IO-APIC-fasteoi   wifi4
 18:  309834163   IO-APIC-fasteoi   wifi2, eth1
 19:  710448584   IO-APIC-fasteoi   wifi0, wifi3
 20:          0   IO-APIC-fasteoi   ohci_hcd:usb3
 21:          0   IO-APIC-fasteoi   ohci_hcd:usb2
 22: 1674324579   IO-APIC-fasteoi   ehci_hcd:usb1, eth0
NMI:          0   Non-maskable interrupts
LOC: 1533869130   Local timer interrupts
TRM:          0   Thermal event interrupts
SPU:          0   Spurious interrupts
ERR:          0
MIS:          0

In my opinion, after brief code analyzing (ath/if_ath_pci.c file), request_irq should be called after ath_attach. With applied patch (which is attached to this ticket), problem goes away.

Same problem exists with trunk (I have tested with r4079) and 0.9.4 versions.

Attachments

madwifi-trunk-r4079-20090712-request_irq_after_ath_attach.patch (1.0 kB) - added by nenad@panline.net on 08/07/09 11:35:42.
reorder request_irq and ath_attach

Change History

08/07/09 11:35:42 changed by nenad@panline.net

  • attachment madwifi-trunk-r4079-20090712-request_irq_after_ath_attach.patch added.

reorder request_irq and ath_attach