From: Felix Fietkau <nbd@openwrt.org>
To: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
rodrigue@qca.qualcomm.com, shafi.wireless@gmail.com,
vthiagar@qca.qualcomm.com
Subject: Re: [PATCH v9 2/4] ath9k: always call ath_reset from workqueue context
Date: Tue, 30 Aug 2011 18:58:33 +0200 [thread overview]
Message-ID: <4E5D16B9.6030809@openwrt.org> (raw)
In-Reply-To: <20110830165402.GA9333@vmraj-lnx.users.atheros.com>
On 2011-08-30 6:54 PM, Rajkumar Manoharan wrote:
> On Tue, Aug 30, 2011 at 05:52:02PM +0200, Felix Fietkau wrote:
>> On 2011-08-30 4:20 PM, Rajkumar Manoharan wrote:
>> >On Tue, Aug 30, 2011 at 10:30:45AM +0200, Felix Fietkau wrote:
>> >> This makes it much easier to add further rework to avoid race conditions
>> >> between reset and other work items.
>> >> Move other functions to make ath_reset static.
>> >>
>> >> Signed-off-by: Felix Fietkau<nbd@openwrt.org>
>> >> ---
>> >> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
>> >> index 49b93c2..2b2a975 100644
>> >> --- a/drivers/net/wireless/ath/ath9k/xmit.c
>> >> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
>> >> @@ -581,8 +581,10 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
>> >>
>> >> rcu_read_unlock();
>> >>
>> >> - if (needreset)
>> >> - ath_reset(sc, false);
>> >> + if (needreset) {
>> >> + sc->sc_flags |= SC_OP_HW_RESET;
>> >> + ieee80211_queue_work(sc->hw,&sc->hw_reset_work);
>> >> + }
>> >> }
>> >>
>> >Still ath_txq_schedule can be scheduled. Return a error code from
>> >ath_tx_complete_aggr to abort tx process intead of SC_OP_HW_RESET.
>> >That looks much more generic and simple.
>> I added this to make sure that there won't be any subsequent
>> attempts at processing the tx queue until the reset (e.g. if there
>> was a tx status IRQ in the mean time).
>>
> If so, it would be safer not to re-enable interrupts at the end of ath9k_tasklet
> if SC_OP_HW_RESET is set.
I think tx is the primary issue here, so I only added the check to the
tx processing functions.
- Felix
prev parent reply other threads:[~2011-08-30 16:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 8:30 [PATCH v9 1/4] ath9k: eliminate common->{rx,tx}_chainmask Felix Fietkau
2011-08-30 8:30 ` [PATCH v9 2/4] ath9k: always call ath_reset from workqueue context Felix Fietkau
2011-08-30 8:30 ` [PATCH v9 3/4] ath9k: merge reset related functions Felix Fietkau
2011-08-30 8:30 ` [PATCH v9 4/4] ath9k: implement .get_antenna and .set_antenna Felix Fietkau
2011-08-30 14:20 ` [PATCH v9 2/4] ath9k: always call ath_reset from workqueue context Rajkumar Manoharan
2011-08-30 15:52 ` Felix Fietkau
2011-08-30 16:54 ` Rajkumar Manoharan
2011-08-30 16:58 ` Felix Fietkau [this message]
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=4E5D16B9.6030809@openwrt.org \
--to=nbd@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rmanohar@qca.qualcomm.com \
--cc=rodrigue@qca.qualcomm.com \
--cc=shafi.wireless@gmail.com \
--cc=vthiagar@qca.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).