From: Felix Fietkau <nbd@openwrt.org>
To: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linville@tuxdriver.com" <linville@tuxdriver.com>,
Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Subject: Re: [PATCH 3/4] ath9k: fix the .flush driver op implementation
Date: Thu, 10 Mar 2011 14:03:34 +0100 [thread overview]
Message-ID: <4D78CC26.4050402@openwrt.org> (raw)
In-Reply-To: <20110310092559.GC28100@vasanth-laptop>
On 2011-03-10 10:25 AM, Vasanthakumar Thiagarajan wrote:
> On Thu, Mar 10, 2011 at 06:05:02AM +0530, Felix Fietkau wrote:
>> ath9k has a timeout of 60ms for the flush, but instead waiting 60 ms for
>> all tx activity to finish, it resets it for every single queue.
>
> No, it does not do reset for every queue.
You're right, I got confused by the diff and my recollection of an old
version of the flush op ;)
>> + for (j = 0; j < timeout; j++) {
>> + int npend = 0;
>> + for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) {
>> + if (!ATH_TXQ_SETUP(sc, i))
>> + continue;
>>
>> - if (drop || ath9k_has_pending_frames(sc, txq)) {
>> - ath_dbg(common, ATH_DBG_QUEUE, "Drop frames from hw queue:%d\n",
>> - txq->axq_qnum);
>> - spin_lock_bh(&txq->axq_lock);
>> - txq->txq_flush_inprogress = true;
>> - spin_unlock_bh(&txq->axq_lock);
>> -
>> - ath9k_ps_wakeup(sc);
>> - ath9k_hw_stoptxdma(ah, txq->axq_qnum);
>> - npend = ath9k_hw_numtxpending(ah, txq->axq_qnum);
>> - ath9k_ps_restore(sc);
>> - if (npend)
>> - break;
>> -
>> - ath_draintxq(sc, txq, false);
>> - txq->txq_flush_inprogress = false;
>> + npend += ath9k_has_pending_frames(sc, &sc->tx.txq[i]);
>> }
>> - }
>>
>> - if (npend) {
>> - ath_reset(sc, false);
>> - txq->txq_flush_inprogress = false;
>> + if (!npend)
>> + goto out;
>> +
>> + usleep_range(1000, 2000);
>
> Existing flush gives about 60ms for every q, that is reasonable
> time, but this 60ms for all the queues is too small. This flush
> is also called before sending null func in PS, so reset after
> hw queue stuck is necessary to find the hang early on.
So maybe we should set it to something like 200ms for all? Anything more
than that seems a bit excessive.
I intend to add some more restrictions for the queue lengths soon, then
we can reduce this timeout even further.
> The usage of txq_flush_inprogress needs to be removed in other
> places in xmit.
OK
- Felix
next prev parent reply other threads:[~2011-03-10 13:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-10 0:35 [PATCH 1/4] ath9k_hw: fix REG_SET_BIT and REG_CLR_BIT for multiple bits Felix Fietkau
2011-03-10 0:35 ` [PATCH 2/4] ath9k: fix stopping tx dma on reset Felix Fietkau
2011-03-10 0:35 ` [PATCH 3/4] ath9k: fix the .flush driver op implementation Felix Fietkau
2011-03-10 0:35 ` [PATCH 4/4] ath9k: improve reliability of beacon transmission and stuck beacon handling Felix Fietkau
2011-03-10 9:46 ` Vasanthakumar Thiagarajan
2011-03-10 13:04 ` Felix Fietkau
2011-03-10 13:15 ` Felix Fietkau
2011-03-10 9:25 ` [PATCH 3/4] ath9k: fix the .flush driver op implementation Vasanthakumar Thiagarajan
2011-03-10 13:03 ` Felix Fietkau [this message]
2011-03-10 8:58 ` [PATCH 2/4] ath9k: fix stopping tx dma on reset Vasanthakumar Thiagarajan
2011-03-10 9:32 ` Vasanthakumar Thiagarajan
2011-03-10 12:47 ` Felix Fietkau
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=4D78CC26.4050402@openwrt.org \
--to=nbd@openwrt.org \
--cc=Luis.Rodriguez@Atheros.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=vasanth@atheros.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).