Michael Buesch wrote:
> On Sunday 26 July 2009 17:37:10 Larry Finger wrote:
>>
>> The revised printk shows
>>
>> b43-phy0 warning: DMA queue overflow with free_slots = 0
>
> Ok, it's a mac80211 bug then.
Perhaps not. I also got the ring->stopped WARN_ON. Is it possible that
a second transmission was held at the spin_lock_irqsave() when the
queues were stopped. If that were the case, the following patch should
fix the problem.
---
Index: wireless-testing/drivers/net/wireless/b43/dma.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/dma.c
+++ wireless-testing/drivers/net/wireless/b43/dma.c
@@ -1334,17 +1334,20 @@ int b43_dma_tx(struct b43_wldev *dev, st
spin_lock_irqsave(&ring->lock, flags);
B43_WARN_ON(!ring->tx);
+
+ if (unlikely(free_slots(ring) < TX_SLOTS_PER_FRAME)) {
+ if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
+ b43warn(dev->wl, "DMA queue overflow with %d"
+ " free slots\n", free_slots(ring));
+ err = -ENOSPC;
+ goto out_unlock;
+ }
+ }
/* Check if the queue was stopped in mac80211,
* but we got called nevertheless.
* That would be a mac80211 bug. */
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;
- }
-
/* Assign the queue number to the ring (if not already done before)
* so TX status handling can use it. The queue to ring mapping is
* static, so we don't need to store it per frame. */
---
I do have one question. Should the "DMA queue overflow" message ever be printed?
It seems to me that we have a 'no harm - no foul' situation.
Larry
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev