[PATCH] b43: use rx desc underrun interrupt

Michael Büsch m at bues.ch
Sun Apr 21 10:59:51 EDT 2013


On Sun, 21 Apr 2013 15:46:03 +0100
Piotras <piotras at gmail.com> wrote:

> On Sun, Apr 21, 2013 at 1:12 PM, Thommy Jakobsson <thommyj at gmail.com> wrote:
> >
> >
> > On Sun, 21 Apr 2013, Michael Büsch wrote:
> >
> >> On Sun, 21 Apr 2013 11:01:11 +0200 (CEST)
> >> Thommy Jakobsson <thommyj at gmail.com> wrote:
> >>
> >> > Why is it set to to beyond the ring when it is initilised?
> >>
> >> That's what broadcom does in their implementation. I guess that's the only reason.
> >>
> > Check, I'll give index-1 a go. It should be quite obvious if it works or
> > not.
> 
> Thommy,
> 
> I had the same thought, but notice that you also need to update
> ring->current_slot in b43_dma_rx_discard.

I don't think so.
We don't modify the descriptor pointer, but the stop index.

> I guess the following could be used to mark all descriptors for DMA
> use from RX underflow interrupt or whenever we decide that number of
> free descriptors is too low (not tested):
> 
>   slot = prev_slot(ring, ops->get_current_rxslot(ring));
>   wmb();
>   ops->set_current_rxslot(ring, slot);

get_current_rxslot() reads a different register than set_current_rxslot().

get_current_rxslot() returns the descriptor pointer that the device is pointing to.
set_current_rxslot() sets the _stop_ index.
Yes, at least the last one is misnamed.

> Not sure if FIFO overruns are really an issue and how to prevent them.
> Maybe RX underflow should be handled in top half and reprogram device
> to suspend receives (is this possible)?

What is "top half"?

-- 
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20130421/4c5e94bf/attachment.sig>


More information about the b43-dev mailing list