cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
241 Views
Registered: ‎05-16-2013

Legacy PCIe interrupt issues with ath9k device

We are having issues using the ath9k WiFi drivers with legacy PCI interrupts.  We are using AR9565 M.2 1630 wifi adapter module.  We have similar results with a ZCU102 with M.2 adapter, and a custom board.  On both of these setups we are using the MPSoC PS PCIe x1 interface. We are using Vivado 2020.2 and Petalinux 2020.2

We receive these messages:

[ 2794.802600] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[ 2794.808519] rcu:     0-...0: (9 ticks this GP) idle=3e2/1/0x4000000000000002 softirq=1820/1820 fqs=2626
[ 2794.817722]  (detected by 3, t=5255 jiffies, g=5865, q=5)
[ 2794.823103] Task dump for CPU 0:
[ 2794.826315] kworker/u8:1    R  running task        0   940      2 0x0000000a
[ 2794.833363] Workqueue: phy0 ieee80211_scan_work
[ 2794.837876] Call trace:
[ 2794.840311]  __switch_to+0x1c4/0x288
[ 2794.843875]  0xffff00086272fe00

It's not always ieee80211_scan_work, but it is always WiFi related.  Below is the output of /proc/interrupts. This shows that we are actually receiving the interrupts.

 

cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3
  3:       3577       3165       5012       1894     GICv2  30 Level     arch_timer
  6:          0          0          0          0     GICv2  67 Level     zynqmp_ipi
 11:          0          0          0          0     GICv2 155 Level     axi-pmon, axi-pmon
 12:          0          0          0          0     GICv2 156 Level     zynqmp-dma
 13:          0          0          0          0     GICv2 157 Level     zynqmp-dma
 14:          0          0          0          0     GICv2 158 Level     zynqmp-dma
 15:          0          0          0          0     GICv2 159 Level     zynqmp-dma
 16:          0          0          0          0     GICv2 160 Level     zynqmp-dma
 17:          0          0          0          0     GICv2 161 Level     zynqmp-dma
 18:          0          0          0          0     GICv2 162 Level     zynqmp-dma
 19:          0          0          0          0     GICv2 163 Level     zynqmp-dma
 20:          0          0          0          0     GICv2 109 Level     zynqmp-dma
 21:          0          0          0          0     GICv2 110 Level     zynqmp-dma
 22:          0          0          0          0     GICv2 111 Level     zynqmp-dma
 23:          0          0          0          0     GICv2 112 Level     zynqmp-dma
 24:          0          0          0          0     GICv2 113 Level     zynqmp-dma
 25:          0          0          0          0     GICv2 114 Level     zynqmp-dma
 26:          0          0          0          0     GICv2 115 Level     zynqmp-dma
 27:          0          0          0          0     GICv2 116 Level     zynqmp-dma
 29:         44          0          0          0     GICv2  95 Level     eth0, eth0
 31:          5          0          0          0     GICv2  50 Level     cdns-i2c
 32:          0          0          0          0     GICv2  42 Level     ff960000.memory-controller
 33:          0          0          0          0     GICv2  57 Level     axi-pmon, axi-pmon
 34:          0          0          0          0     GICv2 150 Level     nwl_pcie:misc
 39:          0          0          0          0     GICv2  47 Level     ff0f0000.spi
 40:          2          0          0          0     GICv2  58 Level     ffa60000.rtc
 41:          0          0          0          0     GICv2  59 Level     ffa60000.rtc
 42:        742          0          0          0     GICv2  80 Level     mmc0
 43:          1          0          0          0     GICv2  51 Level     ff040000.spi
 44:        446          0          0          0     GICv2  53 Level     xuartps
 45:          0          0          0          0     GICv2  88 Level     ams-irq
 46:          1          0          0          0     GICv2 121 Level     xilinx-pcie
 51:          0          0          0          0     dummy   0 Level     PCIe PME, aerdrv, PCIe PME, aerdrv
 52:       8235          0          0          0  nwl_pcie:legacy   0 Level     PCIe PME, aerdrv, ath9k
 54:          0          0          0          0     GICv2 101 Level     dwc3_otg
IPI0:      1644       4158        810       1292       Rescheduling interrupts
IPI1:        66         72         36        192       Function call interrupts
IPI2:         0          0          0          0       CPU stop interrupts
IPI3:         0          0          0          0       CPU stop (for crash dump) interrupts
IPI4:         0          0          0          0       Timer broadcast interrupts
IPI5:         0          0          0          0       IRQ work interrupts
IPI6:         0          0          0          0       CPU wake-up interrupts
Err:          0

The ath9k kernel module can also be configured to use MSI interrupts, using the use_msi=1 module parameter.  When we use this option then we have no detected stalls and WiFi seems very stable.  Snippit of /proc/interrupts below:

 

 59:       7170          0          0          0  nwl_pcie:msi 134742016 Edge      ath9k

This is great, problem solved... for client mode.  If we try to run a host AP with hostapd.  According to this forum post they needed to disable MSI interrupts to utilize hostapd.  My assumption is that the kernel module isn't properly using MSI interrupts in AP mode.  So we remove the ath9k kernel module and insmod it back without the use_msi flag.  The hostap works great and we can see and connect to the access point.  But after a while the CPU hangs and will no longer responds to serial input ssh (over ethernet interface).

Through google I found this patch, which seems to address similar issues.  According to the linux repo on Xilinx's GitHub page this patch has made its way into the kernel.  

 

Can anyone offer any guidance?

0 Kudos
1 Reply
pvenugo
Moderator
Moderator
71 Views
Registered: ‎07-31-2012

bfrantz@alionscience.com ,

Are you saying that 2020.2 version linux driver for PS PCIe is not supporting legacy interrupt but works for MSI?

Could you share information on replicating this issue at my end please so that I can try on ZU+ evaluation board?

Any specific EP device need to be used when PS PCIe here is RP?

 

Regards

Praveen


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos