summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Fritz <chf.fritz@googlemail.com>2014-04-30 10:32:02 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-05-05 09:19:18 +0200
commit7af9c3a84384b4330ba961ea5bf3a7a79d8ad1f1 (patch)
tree0722b00eb90dd6dafcc3d970cbfa2c15d79c2848
parent5dafef6aaf81d96f92eff3365f62f18fe89b3136 (diff)
downloadbarebox-7af9c3a84384b4330ba961ea5bf3a7a79d8ad1f1.tar.gz
barebox-7af9c3a84384b4330ba961ea5bf3a7a79d8ad1f1.tar.xz
net cpsw: fix rx stability under heavy network load
RX DMA Head Descriptor Pointer can get 0 when there is a lot of traffic, which results in a timeout error. A good way to provoke this error is by sending lots of ARP requests. This patch makes sure that the RX DMA Head Descriptor Pointer is set. The origin driver, from which this is derived, already contains this fix. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/net/cpsw.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 52adf50205..ec3263d4aa 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -741,8 +741,13 @@ static int cpdma_process(struct cpsw_priv *priv, struct cpdma_chan *chan,
if (buffer)
*buffer = (void *)readl(&desc->sw_buffer);
- if (status & CPDMA_DESC_OWNER)
+ if (status & CPDMA_DESC_OWNER) {
+ if (readl(chan->hdp) == 0) {
+ if (readl(&desc->hw_mode) & CPDMA_DESC_OWNER)
+ writel((u32)desc, chan->hdp);
+ }
return -EBUSY;
+ }
chan->head = (void *)readl(&desc->hw_next);