From: Larry Finger <Larry.Finger@lwfinger.net>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>,
Michael Buesch <mb@bu3sch.de>,
wireless <linux-wireless@vger.kernel.org>
Subject: Possible BUG where mac80211 fails to stop queues
Date: Sun, 26 Jul 2009 17:52:22 -0500 [thread overview]
Message-ID: <4A6CDE26.3000409@lwfinger.net> (raw)
While stress testing the newest version of the open-source firmware
for BCM43XX devices with the latest pull of wireless-testing, I ran
into a problem of DMA TX queue overrun. Initially I thought this was
due to the firmware change; however, I got the same error with the
standard firmware. I have not seen this before, but it may not be a
regression as it seems to occur only under special circumstances.
The critical code is in b43_dma_tx(), which is called by the .tx
callback routine registered with mac80211.
After the fragment is transmitted by a call to dma_tx_fragment() at
line 1353, the routine checks to see if there are sufficient free
slots (2) to transmit another fragment using the code below:
if ((free_slots(ring) < TX_SLOTS_PER_FRAME) ||
should_inject_overflow(ring)) {
/* This TX ring is full. */
ieee80211_stop_queue(dev->wl->hw,
skb_get_queue_mapping(skb));
ring->stopped = 1;
if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
b43dbg(dev->wl, "Stopped TX ring %d\n",
ring->index);
}
}
The problem shows up at line 1340 for the next fragment:
B43_WARN_ON(ring->stopped);
if (unlikely(free_slots(ring) < TX_SLOTS_PER_FRAME)) {
b43warn(dev->wl, "DMA queue overflow\n");
err = -ENOSPC;
goto out_unlock;
}
The system generates the warning for ring->stopped and prints the "DMA
queue overflow" message.
My understanding is that mac80211 serializes the calls for each TX
queue, and that the TX callback should not have been entered for this
case.
If I am not understanding the way that mac80211 works, please correct
me. I would also appreciate any suggestions for further debugging.
Larry
next reply other threads:[~2009-07-26 22:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-26 22:52 Larry Finger [this message]
2009-07-27 8:48 ` Possible BUG where mac80211 fails to stop queues Johannes Berg
2009-07-27 15:55 ` Larry Finger
2009-07-27 16:04 ` Johannes Berg
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=4A6CDE26.3000409@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mb@bu3sch.de \
/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