From: merez@codeaurora.org
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com
Subject: Re: [PATCH 13/16] wil6210: ignore HALP ICR if already handled
Date: Tue, 06 Nov 2018 14:24:49 +0200 [thread overview]
Message-ID: <872e24220a45caf78fc3679c3bcfe7c2@codeaurora.org> (raw)
In-Reply-To: <875zxabjyn.fsf@purkki.adurom.net>
On 2018-11-06 12:04, Kalle Valo wrote:
> Maya Erez <merez@codeaurora.org> writes:
>
>> HALP ICR is set as long as the FW should stay awake.
>> To prevent its multiple handling the driver masks this IRQ bit.
>> However, if there is a different MISC ICR before the driver clears
>> this bit, there is a risk of race condition between HALP mask and
>> unmask. This race leads to HALP timeout, in case it is mistakenly
>> masked.
>> Add an atomic flag to indicate if HALP ICR should be handled.
>>
>> Signed-off-by: Maya Erez <merez@codeaurora.org>
>
> [...]
>
>> --- a/drivers/net/wireless/ath/wil6210/interrupt.c
>> +++ b/drivers/net/wireless/ath/wil6210/interrupt.c
>> @@ -575,10 +575,14 @@ static irqreturn_t wil6210_irq_misc(int irq,
>> void *cookie)
>> }
>>
>> if (isr & BIT_DMA_EP_MISC_ICR_HALP) {
>> - wil_dbg_irq(wil, "irq_misc: HALP IRQ invoked\n");
>> - wil6210_mask_halp(wil);
>> isr &= ~BIT_DMA_EP_MISC_ICR_HALP;
>> - complete(&wil->halp.comp);
>> + if (atomic_read(&wil->halp.handle_icr)) {
>> + /* no need to handle HALP ICRs until next vote */
>> + atomic_set(&wil->halp.handle_icr, 0);
>
> atomic_read() followed by atomic_set() is IMHO not really atomic :) I
> would assume there's a function to reset the variable really in atomic
> way.
Actually it shouldn't be atomic :-)
I'll remove it.
--
Maya Erez
Qualcomm Israel, Inc. on behalf of Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-11-06 12:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 8:52 [PATCH 00/16] wil6210 patches Maya Erez
2018-10-31 8:52 ` [PATCH 01/16] wil6210: remove fake support for RXHASH Maya Erez
2018-11-06 16:05 ` Kalle Valo
2018-10-31 8:52 ` [PATCH 02/16] wil6210: fix reset flow for Talyn-mb Maya Erez
2018-10-31 8:52 ` [PATCH 03/16] wil6210: increase RX rings and RX buff array size Maya Erez
2018-10-31 8:52 ` [PATCH 04/16] wil6210: make sure Rx ring sizes are correlated Maya Erez
2018-10-31 8:52 ` [PATCH 05/16] wil6210: add recovery for FW error while in AP mode Maya Erez
2018-10-31 8:52 ` [PATCH 06/16] wil6210: fix memory leak in wil_find_tx_bcast_2 Maya Erez
2018-10-31 8:52 ` [PATCH 07/16] wil6210: refactor disconnect flow Maya Erez
2018-11-06 10:30 ` Kalle Valo
2018-11-06 11:52 ` merez
2018-11-06 12:28 ` Kalle Valo
2018-11-06 12:38 ` merez
2018-11-06 12:40 ` Kalle Valo
2018-10-31 8:52 ` [PATCH 08/16] wil6210: notify cqm packet loss on disable_ap_sme Maya Erez
2018-10-31 8:52 ` [PATCH 09/16] wil6210: add general initialization/size checks Maya Erez
2018-10-31 8:52 ` [PATCH 10/16] wil6210: fix debugfs memory access alignment Maya Erez
2018-10-31 8:52 ` [PATCH 11/16] wil6210: fix L2 RX status handling Maya Erez
2018-10-31 8:52 ` [PATCH 12/16] wil6210: fix RGF_CAF_ICR address for Talyn-MB Maya Erez
2018-10-31 8:52 ` [PATCH 13/16] wil6210: ignore HALP ICR if already handled Maya Erez
2018-11-06 10:04 ` Kalle Valo
2018-11-06 12:24 ` merez [this message]
2018-10-31 8:52 ` [PATCH 14/16] wil6210: remove unnecessary alignment code from rx flow Maya Erez
2018-10-31 8:52 ` [PATCH 15/16] wil6210: fix freeing of rx buffers in EDMA mode Maya Erez
2018-10-31 8:52 ` [PATCH 16/16] wil6210: fix locking in wmi_call Maya Erez
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=872e24220a45caf78fc3679c3bcfe7c2@codeaurora.org \
--to=merez@codeaurora.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=wil6210@qti.qualcomm.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;
as well as URLs for NNTP newsgroup(s).