[PATCH] b43: use rx desc underrun interrupt

Thommy Jakobsson thommyj at gmail.com
Sun Apr 21 05:01:11 EDT 2013



On Sun, 21 Apr 2013, Michael Büsch wrote:

> On Sun, 21 Apr 2013 10:22:51 +0200 (CEST)
> Thommy Jakobsson <thommyj at gmail.com> wrote:
> 
> > The device stops sending when it hits the rx index. Thats what rx index 
> > is, the address after the last slot the device is allowed to use. In the 
> > driver it is used as the last slot handled, so if the device would 
> > continue it will overwrite slots that hasn't been read. So you need to 
> > handle that in someway. One way is using my patch, another is to never let 
> > it hit rx index (as Piotras is working on).
> 
> Yeah I get that. But why do we need to handle that by putting the stop index
> right beyond the ring? That requires us to get another RX interrupt before the
> ring fills up again. Why can't we set it so that the ring is fully writable again,
> but not set it beyond the ring boundary? I guess that is decrementing it by one,
> perhaps, honoring 0-index-wrapover.
>
All times that I had extra debugging on I always got a normal rx interrupt 
at the same time as the underflow interrupt. So the b43_dma_rx is called 
just after the b43_rx_discard, and the rx index is updated again to 
something better. Writing the rx index to index-1 was my initial plan, the 
only reason why I chose beyond the ring boundary was because thats how it 
is initialised. I never tried index-1, so I don't know if it works though. 
It did try to write the same value back again, but of course that didn't 
work.

Why is it set to to beyond the ring when it is initilised?

> > Normally the device never hit the rx index, and in such case it will just 
> > use the next descriptor in the table. If it finds a descriptor with END 
> > set, it will jump back to the beginning. Forming the ring
> 
> I know how that basic stuff works, because I wrote most of the code ;D
and yet you didn't fix this problem... =) Just kidding, to be honest I 
didn't understand what in my patch your question concerned. So I pretty 
much wrote down all I know about how it works (or how I think it works).

Thanks,
Thommy


More information about the b43-dev mailing list