From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lamar Hansford Date: Mon, 1 Aug 2016 17:19:29 +0000 Subject: [ath9k-devel] ath9k MSI interupts Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Configuration: * NVidia T30 * AR9485 (also AR9460) * Kernel 4.6.2 Our company is developing a product on an ARM based platform which requires use of MSI interrupts (legacy interrupts do not seem to work). I have updated the ath9k driver to enable MSI interrupts, however I have a few questions: ISSUE 1: When I enable MSI interrupts and allocate ISR it appears the interrupt is masked. Pseudo code as follows: * REG_WRITE(ah, AR_PCIE_MSI, AR_PCIE_MSI_ENABLE); * num_irq = pci_msi_vec_count(pdev); * ret = pci_enable_msi_range(pdev, 1, num_irq); Resulting in: lspci -v 01:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01) Subsystem: Qualcomm Atheros AR9485 Wireless Network Adapter Flags: bus master, fast devsel, latency 0, IRQ 391 Memory at 20000000 (64-bit, non-prefetchable) [size=512K] [virtual] Expansion ROM at 20080000 [disabled] [size=64K] Capabilities: [40] Power Management version 2 Capabilities: [50] MSI: Enable+ Count=1/4 Maskable+ 64bit+ Capabilities: [70] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [140] Virtual Channel Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00 Kernel driver in use: ath9k Kernel modules: ath9k If I dump the MSI entry (msi_desc ) I see the Aug 1 16:19:17 s02702016 kernel: [ 311.350904] ath: phy0: ATH9K PCI-MSI-LIST-ENTRY: 0 Aug 1 16:19:17 s02702016 kernel: [ 311.352673] ath: phy0: ATH9K PCI-MSI-LIST-IRQ: 391 Aug 1 16:19:17 s02702016 kernel: [ 311.352695] ath: phy0: ATH9K PCI-MSI-LIST-NVEC: 1 Aug 1 16:19:17 s02702016 kernel: [ 311.352714] ath: phy0: ATH9K PCI-MSI-LIST-MASKED: fffffffe Aug 1 16:19:17 s02702016 kernel: [ 311.352732] ath: phy0: ATH9K PCI-MSI-LIST-ISMSIX: 0 Aug 1 16:19:17 s02702016 kernel: [ 311.352750] ath: phy0: ATH9K PCI-MSI-LIST-MULTI: 0 Aug 1 16:19:17 s02702016 kernel: [ 311.352767] ath: phy0: ATH9K PCI-MSI-LIST-MULTICAP: 2 Aug 1 16:19:17 s02702016 kernel: [ 311.352783] ath: phy0: ATH9K PCI-MSI-LIST-MASK: 1 Aug 1 16:19:17 s02702016 kernel: [ 311.352800] ath: phy0: ATH9K PCI-MSI-LIST-ENTRY: 0 SYSLOG Jul 29 18:38:33 s02702016 kernel: [ 128.363804] WARNING: CPU: 1 PID: 1138 at kernel/irq/manage.c:511 __enable_irq+0x54/0x80 Jul 29 18:38:33 s02702016 kernel: [ 128.364078] [] (warn_slowpath_fmt) from [] (__enable_irq+0x54/0x80) Jul 29 18:38:33 s02702016 kernel: [ 128.364113] [] (__enable_irq) from [] (enable_irq+0x44/0x7c) Jul 29 18:38:33 s02702016 kernel: [ 128.364393] [] (enable_irq) from [] (ath_pci_probe+0x568/0x944 [ath9k]) Jul 29 18:38:33 s02702016 kernel: [ 128.366378] WARNING: CPU: 1 PID: 1138 at kernel/irq/manage.c:511 __enable_irq+0x54/0x80 Jul 29 18:38:33 s02702016 kernel: [ 128.367054] [] (warn_slowpath_fmt) from [] (__enable_irq+0x54/0x80) Jul 29 18:38:33 s02702016 kernel: [ 128.367127] [] (__enable_irq) from [] (enable_irq+0x44/0x7c) Jul 29 18:38:33 s02702016 kernel: [ 128.367345] [] (enable_irq) from [] (ath_pci_probe+0x734/0x944 [ath9k]) Jul 29 18:38:33 s02702016 kernel: [ 128.368975] ieee80211 phy0: Atheros AR9462 Rev:2 mem=0xf2000000, irq=391 I suspect that I need to write a register to un-mask the MSI interrupts. NOTE: I have other peripherals (wired Ethernet) which uses MSI-X interrupts with no issue. ISSUE 2 The number of vectors supported indicates 4. However when I call: * pci_enable_msi_range(pdev, 1, num_irq); It returns that only a single IRQ is allocated. This seems problematic as I expect that there are separate IRQ for RX/TX/error/control. Any help would be appreciated. -Lamar This email and any attachments may contain private, confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please immediately delete this email and any attachments.