Message ID | 20100503134244.42345pyaszhd9f8c@limpopo.deheime.ch |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Mon, May 03, 2010 at 01:42:44PM +0200, Stefan Agner wrote: > Receiving small packet(s) in a fast pace leads to not receiving any > packets at all after some time. > > After ethernet packet(s) arrived the receive descriptor is incremented > by the number of frames processed. If another packet arrives while > processing, this is processed in another call of ep93xx_rx. This > second call leads that too many receive descriptors getting released. > > This fix increments, even in these case, the right number of processed > receive descriptors. > > Signed-off-by: Stefan Agner <stefan@agner.ch> I haven't opened my ep93xx docs for a while, but if this works for you: Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Lennert Buytenhek <buytenh@wantstofly.org> Date: Tue, 4 May 2010 03:46:07 +0200 > On Mon, May 03, 2010 at 01:42:44PM +0200, Stefan Agner wrote: > >> Receiving small packet(s) in a fast pace leads to not receiving any >> packets at all after some time. >> >> After ethernet packet(s) arrived the receive descriptor is incremented >> by the number of frames processed. If another packet arrives while >> processing, this is processed in another call of ep93xx_rx. This >> second call leads that too many receive descriptors getting released. >> >> This fix increments, even in these case, the right number of processed >> receive descriptors. >> >> Signed-off-by: Stefan Agner <stefan@agner.ch> > > I haven't opened my ep93xx docs for a while, but if this works for you: > > Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> I had to apply this by hand because Stefan's email client corrupted the spacing et al. in the patch. Stefan please post a usable patch next time. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 6995169..cd6cd3e 100644 --- a/drivers/net/arm/ep93xx_eth.c +++ b/drivers/net/arm/ep93xx_eth.c @@ -311,11 +311,6 @@ err: processed++; } - if (processed) { - wrw(ep, REG_RXDENQ, processed); - wrw(ep, REG_RXSTSENQ, processed); - } - return processed; } @@ -350,6 +345,11 @@ poll_some_more: goto poll_some_more; } + if (rx) { + wrw(ep, REG_RXDENQ, rx); + wrw(ep, REG_RXSTSENQ, rx); + } + return rx; }
Receiving small packet(s) in a fast pace leads to not receiving any packets at all after some time. After ethernet packet(s) arrived the receive descriptor is incremented by the number of frames processed. If another packet arrives while processing, this is processed in another call of ep93xx_rx. This second call leads that too many receive descriptors getting released. This fix increments, even in these case, the right number of processed receive descriptors. Signed-off-by: Stefan Agner <stefan@agner.ch> --- drivers/net/arm/ep93xx_eth.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)