diff options
author | Erik Waling <erik.waling@konftel.se> | 2009-04-15 23:32:10 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-17 01:30:33 -0700 |
commit | ee33c58541bae92669fe64a39f695ab533d0de14 (patch) | |
tree | 851d392d9a9517e0e0bcc545c76d4729e4391d3b /drivers/net/macb.c | |
parent | 2f3889f42ec7c2b0c3049ecdd8e4687b6930779a (diff) | |
download | linux-ee33c58541bae92669fe64a39f695ab533d0de14.tar.gz linux-ee33c58541bae92669fe64a39f695ab533d0de14.tar.bz2 linux-ee33c58541bae92669fe64a39f695ab533d0de14.zip |
macb: Handle Retry Limit Exceeded errors
When transfering large amounts of data we sometimes experienced that the
Retry Limit Exceeded (RLE) bit got set in TSR during transmission
attempts. When this happened the driver would stall in a state that
prevented any more data from being sent.
Signed-off-by: Erik Waling <erik.waling@konftel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 46073de290cf..9fcc717f4d1a 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -316,10 +316,11 @@ static void macb_tx(struct macb *bp) dev_dbg(&bp->pdev->dev, "macb_tx status = %02lx\n", (unsigned long)status); - if (status & MACB_BIT(UND)) { + if (status & (MACB_BIT(UND) | MACB_BIT(TSR_RLE))) { int i; - printk(KERN_ERR "%s: TX underrun, resetting buffers\n", - bp->dev->name); + printk(KERN_ERR "%s: TX %s, resetting buffers\n", + bp->dev->name, status & MACB_BIT(UND) ? + "underrun" : "retry limit exceeded"); /* Transfer ongoing, disable transmitter, to avoid confusion */ if (status & MACB_BIT(TGO)) @@ -590,7 +591,8 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) } } - if (status & (MACB_BIT(TCOMP) | MACB_BIT(ISR_TUND))) + if (status & (MACB_BIT(TCOMP) | MACB_BIT(ISR_TUND) | + MACB_BIT(ISR_RLE))) macb_tx(bp); /* |