Skip to content

Commit

Permalink
macb: Handle Retry Limit Exceeded errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Erik Waling authored and David S. Miller committed Apr 17, 2009
1 parent 2f3889f commit ee33c58
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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);

/*
Expand Down

0 comments on commit ee33c58

Please sign in to comment.