Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Lamar Hansford <Lamar.Hansford@maxpoint.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] ath9k MSI interupts
Date: Mon, 1 Aug 2016 17:25:48 +0000	[thread overview]
Message-ID: <F9D95AC275991E48901933FBF3337AB02D831CED@ex-02> (raw)

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.

             reply	other threads:[~2016-08-01 17:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01 17:25 Lamar Hansford [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-08-01 17:19 [ath9k-devel] ath9k MSI interupts Lamar Hansford
2016-08-02 17:45 ` Adrian Chadd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F9D95AC275991E48901933FBF3337AB02D831CED@ex-02 \
    --to=lamar.hansford@maxpoint.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).