Skip to content

Commit

Permalink
net: ep93xx_eth stops receiving packets
Browse files Browse the repository at this point in the history
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>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 4, 2010
1 parent d050700 commit 1827d2e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/net/arm/ep93xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,6 @@ static int ep93xx_rx(struct net_device *dev, int processed, int budget)
processed++;
}

if (processed) {
wrw(ep, REG_RXDENQ, processed);
wrw(ep, REG_RXSTSENQ, processed);
}

return processed;
}

Expand Down Expand Up @@ -350,6 +345,11 @@ static int ep93xx_poll(struct napi_struct *napi, int budget)
goto poll_some_more;
}

if (rx) {
wrw(ep, REG_RXDENQ, rx);
wrw(ep, REG_RXSTSENQ, rx);
}

return rx;
}

Expand Down

0 comments on commit 1827d2e

Please sign in to comment.