From: Felix Fietkau <nbd@openwrt.org>
To: Mohammed Shafi <shafi.wireless@gmail.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
mcgrof@qca.qualcomm.com
Subject: Re: [PATCH 1/3] ath9k: fix enabling interrupts after a hardware error interrupt
Date: Thu, 15 Sep 2011 09:19:59 +0200 [thread overview]
Message-ID: <4E71A71F.60306@openwrt.org> (raw)
In-Reply-To: <CAD2nsn2G645x00RCLpk7xvT8iBxr+RGN=mdCVAN9jkjKNh7M7Q@mail.gmail.com>
On 2011-09-15 9:14 AM, Mohammed Shafi wrote:
> Hi Felix,
>
> On Thu, Sep 15, 2011 at 12:53 AM, Felix Fietkau<nbd@openwrt.org> wrote:
>> The interrupt handler increases the interrupt disable refcount, so the
>> tasklet needs to always call ath9k_hw_enable_interrupts.
>>
>> Signed-off-by: Felix Fietkau<nbd@openwrt.org>
>> ---
>> drivers/net/wireless/ath/ath9k/main.c | 9 +++++----
>> 1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
>> index 8a17cff5..a3c3316 100644
>> --- a/drivers/net/wireless/ath/ath9k/main.c
>> +++ b/drivers/net/wireless/ath/ath9k/main.c
>> @@ -669,15 +669,15 @@ void ath9k_tasklet(unsigned long data)
>> u32 status = sc->intrstatus;
>> u32 rxmask;
>>
>> + ath9k_ps_wakeup(sc);
>
> this is done in ath_reset, is there any corner cases that I had missed ?
>
>> + spin_lock(&sc->sc_pcu_lock);
>
> spin_lock_bh(&sc->sc_pcu_lock) in ath_reset_internal, won't be a
> problem know, or should we need to move this lock
>
>> +
>> if ((status& ATH9K_INT_FATAL) ||
>> (status& ATH9K_INT_BB_WATCHDOG)) {
>> ieee80211_queue_work(sc->hw,&sc->hw_reset_work);
>> - return;
>> + goto out;
>> }
>>
>> - ath9k_ps_wakeup(sc);
>> - spin_lock(&sc->sc_pcu_lock);
>> -
>> /*
>> * Only run the baseband hang check if beacons stop working in AP or
>> * IBSS mode, because it has a high false positive rate. For station
>> @@ -725,6 +725,7 @@ void ath9k_tasklet(unsigned long data)
>> if (status& ATH9K_INT_GENTIMER)
>> ath_gen_timer_isr(sc->sc_ah);
>>
>> +out:
>> /* re-enable hardware interrupt */
>> ath9k_hw_enable_interrupts(ah);
>
>
> this is done in ath_complete_reset, should we enable interrupts if
> some times ath9k_hw_reset fails?
> please correct me if I had understood wrongly. thanks!
ath9k_hw_enable_interrupts was changed to use refcounting to keep
interrupts blocked. The interrupt handler increses the refcount, so the
tasklet needs to decrease it. When a reset is issued, it starts by
disabling interrupts, then re-enables them after completing the reset.
Disabling interrupts in the ISR, but not enabling them in the tasklet
causes an imbalance which leaves interrupts disabled after the reset is
done.
- Felix
next prev parent reply other threads:[~2011-09-15 7:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 19:23 [PATCH 1/3] ath9k: fix enabling interrupts after a hardware error interrupt Felix Fietkau
2011-09-14 19:23 ` [PATCH 2/3] ath9k: make beacon timer initialization more reliable Felix Fietkau
2011-09-14 19:23 ` [PATCH 3/3] ath9k: ensure that rx is not enabled during a reset Felix Fietkau
2011-09-15 7:14 ` [PATCH 1/3] ath9k: fix enabling interrupts after a hardware error interrupt Mohammed Shafi
2011-09-15 7:19 ` Felix Fietkau [this message]
2011-09-15 7:57 ` Mohammed Shafi
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=4E71A71F.60306@openwrt.org \
--to=nbd@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
--cc=shafi.wireless@gmail.com \
/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