From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thommy Jakobsson Date: Sat, 20 Apr 2013 21:47:10 +0200 (CEST) Subject: [PATCH] b43: use rx desc underrun interrupt In-Reply-To: <20130420211223.640b7c5b@milhouse> References: <20130420211223.640b7c5b@milhouse> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: b43-dev@lists.infradead.org On Sat, 20 Apr 2013, Michael B?sch wrote: > On Sat, 20 Apr 2013 16:14:09 +0200 (CEST) > Thommy wrote: > > > +void b43_dma_rx_discard(struct b43_dmaring *ring) > > +{ > > + B43_WARN_ON(ring->tx); > > + > > + /* Device has filled all buffers, drop all packets in buffers > > + * and let TCP decrease speed. > > + * Set index to one desc after the last one > > + * so the device will see all slots as free again > > + */ > > + /* > > + *TODO: How to increase rx_drop in mac80211? > > + */ > > + b43_dma_write(ring, B43_DMA32_RXINDEX, ring->nr_slots * > > + sizeof(struct b43_dmadesc32)); > > +} > > You need to check whether this is a 32bit or 64bit DMA engine and > write to B43_DMA32_RXINDEX or B43_DMA64_RXINDEX. > You could simply use the ring->ops->set_current_rxslot() dmaop for that. > Good point, I'll fix that > And I think you need to set ring->current_slot to the value of ring->ops->get_current_slot(). > Not 100% sure, though, since it is years since I worked on that code. > Is that really needed? They should already be the same since the device has thrown the underflow interrupt, or do I miss some race condition? //thommy