On Sunday 26 July 2009 05:16:53 Larry Finger wrote:
> Michael Buesch wrote:
> > On Friday 24 July 2009 16:48:49 Larry Finger wrote:
> >> Francesco,
> >>
> >> Sorry, but I missed a warning about DMA queue overflow that was being
> >> logged as follows:
> > 
> > Can you printk the value of free_slots(), when this happens?
> 
> I have a printk in place, but that warning has not happened again.

Just to explain my idea:
I think there are two ways for this warning to trigger.
The first being mac80211 being broken and not stopping the queue on request.
That's probably not very likely.
The second could possibly be the firmware reporting status for one frame
multiple times. I did not check the whole code, but this could possibly
lead to an integer under/overflow in the free_slots() calculation. A signed 
integer
is used, so I think it can go negative, which would trigger the warning.

I don't see another way to trigger the message.
And as it only seems to happen with open firmware, it seems likely be caused
by TX status reporting in the firmware.

> I made the following changes:
> 
> (1) I put guard words around meta in struct b43_dma_ring, and around
> the skb in struct b43_dmadesc_meta. These were checked in
> b43_dma_handle_txstatus() and were OK. Whatever is setting meta->skb
> to NULL is specific in writing that location.
> 
> (2) I replaced the BUG_ON when meta->skb is NULL with printk
> statements that dump elements of the ring and meta structs. At least I
> get a chance to interrogate the internal data. Furthermore, I can get
> the wireless back by unloading and reloading b43 without rebooting.
> The dumped values are as follows:
> 
> b43: meta data: skb              (null)
>                 dmaaddr          00000000986d50bc
>                 is_last_fragment 1
> b43: ring data: nr_slots       256
>                 used_slots     45
>                 current_slot   65
>                 index          1
>                 tx             1
>                 max_used_slots 256
> 
> Unfortunately, all of these look reasonable - no smoking guns.
> 
> Any suggestions on other values to dump?
> 
> Larry
> 
> 



-- 
Greetings, Michael.
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to