[PATCH] B43: Handle DMA RX descriptor underrun

Thommy Jakobsson thommyj at gmail.com
Sun May 5 15:59:53 EDT 2013



On Sun, 5 May 2013, Rafa? Mi?ecki wrote:

> 2013/5/5 Michael B?sch <m at bues.ch>:
> > On Sun, 5 May 2013 18:31:20 +0200
> > Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
> >
> >> Still worth considering is my previous e-mail. Why writing (for
> >> example) 1 to RXSTOPINDEX doesn't stop firmware from using slot 1?
> >
> > What makes you think this register does not work?
> 
> Take a look at this:
> 
> [  327.224976] [DBG] old current:5      new current:6
> [  327.224982] [DBG] reading slot 5
> [  327.224997] [DBG] writing stop slot 6
> 
> In above ring->slot was 5, but IRQ was generated, and we read new
> "current" using get_current_rxslot. It appeared to be 6. So we read
> packet from slot 5 and then called
> ops->set_current_rxslot(ring, 6);
> AFAIU hardware shouldn't use slot 6, right? But take a look at what
> happens next:
> 
> [  327.319582] [DBG] old current:6      new current:7
> [  327.319590] [DBG] reading slot 6
> [  327.319619] [DBG] writing stop slot 7
> 
> Hardware generated IRQ and we get_current_rxslot returned 7. It means
> we're allowed to read slots up to 7 (excluding). It other words it
> means firmware used slot 6... but 100ms earlier we forbid firmware to
> use slot 6!
> 
> This is part I don't understand. It looks like firmware ignores what
> we set with the ops->set_current_rxslot
As I wrote before, you cannot remove a slot that the device already marked 
as next. The register that you write to with set_current_rxslot is only 
checked when the firmware steps up the current descriptor register. At 
least thats what I have seen from my testing.

//Thommy



More information about the b43-dev mailing list