From: David S. Miller Date: Tue, 4 May 2010 06:21:27 +0000 (-0700) Subject: net: ep93xx_eth stops receiving packets X-Git-Tag: v3.0~5043^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1827d2e943eeb5cba0662f3e6edc342d6bd65ae6;p=platform%2Fkernel%2Flinux-amlogic.git net: ep93xx_eth stops receiving packets 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 Acked-by: Lennert Buytenhek Signed-off-by: David S. Miller --- diff --git a/drivers/net/arm/ep93xx_eth.c b/drivers/net/arm/ep93xx_eth.c index 6995169..cd17d09 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; }