ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
* [ath9k-devel] ath9k MSI interupts
@ 2016-08-01 17:19 Lamar Hansford
  2016-08-02 17:45 ` Adrian Chadd
  0 siblings, 1 reply; 3+ messages in thread
From: Lamar Hansford @ 2016-08-01 17:19 UTC (permalink / raw)
  To: ath9k-devel

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] [<c0128d78>] (warn_slowpath_fmt) from [<c01a162c>] (__enable_irq+0x54/0x80)
Jul 29 18:38:33 s02702016 kernel: [  128.364113] [<c01a162c>] (__enable_irq) from [<c01a169c>] (enable_irq+0x44/0x7c)
Jul 29 18:38:33 s02702016 kernel: [  128.364393] [<c01a169c>] (enable_irq) from [<bf277b74>] (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] [<c0128d78>] (warn_slowpath_fmt) from [<c01a162c>] (__enable_irq+0x54/0x80)
Jul 29 18:38:33 s02702016 kernel: [  128.367127] [<c01a162c>] (__enable_irq) from [<c01a169c>] (enable_irq+0x44/0x7c)
Jul 29 18:38:33 s02702016 kernel: [  128.367345] [<c01a169c>] (enable_irq) from [<bf277d40>] (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.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [ath9k-devel] ath9k MSI interupts
@ 2016-08-01 17:25 Lamar Hansford
  0 siblings, 0 replies; 3+ messages in thread
From: Lamar Hansford @ 2016-08-01 17:25 UTC (permalink / raw)
  To: ath9k-devel

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] [<c0128d78>] (warn_slowpath_fmt) from [<c01a162c>] (__enable_irq+0x54/0x80) Jul 29 18:38:33 s02702016 kernel: [  128.364113] [<c01a162c>] (__enable_irq) from [<c01a169c>] (enable_irq+0x44/0x7c) Jul 29 18:38:33 s02702016 kernel: [  128.364393] [<c01a169c>] (enable_irq) from [<bf277b74>] (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] [<c0128d78>] (warn_slowpath_fmt) from [<c01a162c>] (__enable_irq+0x54/0x80) Jul 29 18:38:33 s02702016 kernel: [  128.367127] [<c01a162c>] (__enable_irq) from [<c01a169c>] (enable_irq+0x44/0x7c) Jul 29 18:38:33 s02702016 kernel: [  128.367345] [<c01a169c>] (enable_irq) from [<bf277d40>] (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.

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

end of thread, other threads:[~2016-08-02 17:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-01 17:19 [ath9k-devel] ath9k MSI interupts Lamar Hansford
2016-08-02 17:45 ` Adrian Chadd
  -- strict thread matches above, loose matches on Subject: below --
2016-08-01 17:25 Lamar Hansford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).