From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael =?UTF-8?B?QsO8c2No?= Date: Sun, 21 Apr 2013 20:44:39 +0200 Subject: [PATCH] b43: use rx desc underrun interrupt In-Reply-To: References: <20130420211223.640b7c5b@milhouse> <20130420215056.3d0b0dbb@milhouse> <20130421083822.5d6599e3@milhouse> <20130421104440.48a3e006@milhouse> <20130421202601.179eaf44@milhouse> Message-ID: <20130421204439.2fa95ecf@milhouse> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: b43-dev@lists.infradead.org On Sun, 21 Apr 2013 20:39:49 +0200 Thommy Jakobsson wrote: > On Apr 21, 2013 8:26 PM, "Michael B?sch" wrote: > > > > On Sun, 21 Apr 2013 20:07:39 +0200 (CEST) > > Thommy Jakobsson wrote: > > > > > +void b43_dma_rx_discard(struct b43_dmaring *ring) > > > +{ > > > + int current_slot, previous_slot; > > > + > > > + 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? > > > + */ > > > + current_slot = ring->ops->get_current_rxslot(ring); > > > + previous_slot = prev_slot(ring, current_slot); > > > + ring->ops->set_current_rxslot(ring, previous_slot); > > > > Hmmm. While this does work (because the register and ring->current_slot > contain the same > > value at this point), I'd prefer if you write ring->current_slot - 1 > > to the stop-index-register. > The reason for the interrupt is because the current index in the device is > the same as the last index. That's why I read the value from the device. > But I fix it, don't have a strong opinion about it. Hm, ok. Well, sounds plausible. So you may keep it as-is. But you should probably rename the function to b43_dma_handle_rx_overflow(), because the discard does not work properly, if the function is called without an overflow in progress. -- Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: