Commit ee33c585 authored by Erik Waling's avatar Erik Waling Committed by David S. Miller

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: default avatarErik Waling <erik.waling@konftel.com>
Signed-off-by: default avatarHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2f3889f4
...@@ -316,10 +316,11 @@ static void macb_tx(struct macb *bp) ...@@ -316,10 +316,11 @@ static void macb_tx(struct macb *bp)
dev_dbg(&bp->pdev->dev, "macb_tx status = %02lx\n", dev_dbg(&bp->pdev->dev, "macb_tx status = %02lx\n",
(unsigned long)status); (unsigned long)status);
if (status & MACB_BIT(UND)) { if (status & (MACB_BIT(UND) | MACB_BIT(TSR_RLE))) {
int i; int i;
printk(KERN_ERR "%s: TX underrun, resetting buffers\n", printk(KERN_ERR "%s: TX %s, resetting buffers\n",
bp->dev->name); bp->dev->name, status & MACB_BIT(UND) ?
"underrun" : "retry limit exceeded");
/* Transfer ongoing, disable transmitter, to avoid confusion */ /* Transfer ongoing, disable transmitter, to avoid confusion */
if (status & MACB_BIT(TGO)) if (status & MACB_BIT(TGO))
...@@ -590,7 +591,8 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) ...@@ -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); macb_tx(bp);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment