ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
From: Lamar Hansford <Lamar.Hansford@maxpoint.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] Interrupt issue on ARM with SMP
Date: Thu, 25 Aug 2016 03:50:36 +0000	[thread overview]
Message-ID: <F9D95AC275991E48901933FBF3337AB0A33157D9@ex-02> (raw)

Hi,
I am trying to port the driver to an ARM platform using SMP where we see a hard lock-up (no panic).  To address this and a number of secondary issues I am refactoring the interrupt handling code and I need to understand the interrupt hand-shake process.

I am using:
*  NVidia T30
* AR9485 (AR9003)

My current understanding of  the code is:
-1-  ISR
    -1- disable all interrupts (IER|AR_INTR_ASYNC_ENABLE|AR_INTR_SYNC_ENABLE)
    -2- schedule tasklet
-2- Tasklet (enable interrupts)
    -1- write default AR_IER
    -2- write default AR_INTR_ASYNC_ENABLE
    -3- write default AR_INTR_ASYNC_MASK
    -4- write default AR_INTR_SYNC_ENABLE
    -5- write default AR_INTR_SYNC_MASK

I would like to change this to:
-1-  ISR
    -1- mask interrupt to be handled
-2- Tasklet (unmask interrupts)
    -1- Un-mask interrupts which are handled

TEST SCENARIO:
* Set interface to manual in /etc/networking/interfaces
* modprobe ath9k
* iw wlan0 set monitor none
* ifconfig wlan0 up

ISSUES:
* I see only two interrupts after reset_complete
* in the first interrupt ATH_OP_HW_RESET is pending.  So ignored
* The second interrupt occurs very close in time after reset_complete which follows sequence below
* no more interrupts

ath_isr
[ 3551.293766] ath: phy6: ISR-IRQ-ISR: 0x81000012
[ 3551.298242] ath: phy6: ISR-IRQ-IMR: 0x81800175
[ 3551.302718] ath: phy6: ISR-IRQ-IMR2: 0xc10000

ar9003_hw_get_isr
[ 3385.525838] ath: phy6: ATH9K REG-ISR-ASYNC-CAUSE: 0 (0x0)
[ 3385.531271] ath: phy6: ATH9K REG-ISR-ASYNC-MASK: 2 (0x2)
[ 3385.536617] ath: phy6: ATH9K REG-ISR-SYNC-CAUSE: 0 (0x0)
[ 3385.541961] ath: phy6: ATH9K REG-ISR-SYNC-MASK: 23f60
[ 3385.547133] ath: phy6: ATH9K REG-ISR-ISR: 0x0, (0x81000012)

Causing the ISR  not being processed due to:
        if (!isr && !sync_cause && !async_cause)
                return false;
and
        if (async_cause & async_mask) {
                if ((REG_READ(ah, AR_RTC_STATUS) & AR_RTC_STATUS_M)
                                == AR_RTC_STATUS_ON){
                        isr = REG_READ(ah, AR_ISR);
                }
        }

If I ignore these and read/process the ISR anyway I still get no further interrupts. I only get sleep timer  calls.

On x86 (which works) I get coninual interrupts which exhibit the following:
Aug 25 03:15:09 s0000 kernel: [190154.647784] ath: phy52: AR_IMR 0x81800175 IER 0x1
Aug 25 03:15:09 s0000 kernel: [190154.651795] ath: phy52: ATH9K-ISR IMR: 0x81800175
Aug 25 03:15:09 s0000 kernel: [190154.651804] ath: phy52: ATH9K-ISR IMR2: 0xc10000
Aug 25 03:15:09 s0000 kernel: [190154.651810] ath: phy52: ATH9K-ISR ISR: 0x4
Aug 25 03:15:09 s0000 kernel: [190154.651820] ath: phy52: ATH9K REG-ISR-ASYNC-CAUSE: 2
Aug 25 03:15:09 s0000 kernel: [190154.651824] ath: phy52: ATH9K REG-ISR-ASYNC-MASK: 2
Aug 25 03:15:09 s0000 kernel: [190154.651827] ath: phy52: ATH9K REG-ISR-SYNC: 0

Any ideas what to explore next?

Additional questions:
* What is the process to mask interrupts?
* Is it possible to mask interrupts without disabling all of them? (normally interrupts remain enabled but only the procedure is masked until serviced).





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-25  3:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25  3:50 Lamar Hansford [this message]
2016-08-25 15:48 ` [ath9k-devel] Interrupt issue on ARM with SMP Adrian Chadd
2016-08-25 18:15   ` Lamar Hansford
2016-08-26  1:33     ` Adrian Chadd
2016-08-26 14:35       ` Lamar Hansford
2016-08-28  4:44         ` Adrian Chadd
2016-08-29 15:27           ` Lamar Hansford

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=F9D95AC275991E48901933FBF3337AB0A33157D9@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 NNTP newsgroup(s).