Netdev List
 help / color / mirror / Atom feed
From: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
To: netdev@vger.kernel.org
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	Erik Waling <erik.waling@konftel.se>,
	Erik Waling <erik.waling@konftel.com>,
	Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Subject: [PATCH 1/2] macb: Handle Retry Limit Exceeded errors
Date: Thu, 16 Apr 2009 11:32:10 +0200	[thread overview]
Message-ID: <1239874331-9431-1-git-send-email-haavard.skinnemoen@atmel.com> (raw)

From: Erik Waling <erik.waling@konftel.se>

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>
---
 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 f505010..22a595c 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);
 
 		/*
-- 
1.6.0.4


             reply	other threads:[~2009-04-16  9:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16  9:32 Haavard Skinnemoen [this message]
2009-04-16  9:32 ` [PATCH 2/2] macb: process the RX ring regardless of interrupt status Haavard Skinnemoen
2009-04-16 18:41   ` Gerard Kam
2009-04-17  8:31   ` David Miller
2009-04-17  8:30 ` [PATCH 1/2] macb: Handle Retry Limit Exceeded errors David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239874331-9431-1-git-send-email-haavard.skinnemoen@atmel.com \
    --to=haavard.skinnemoen@atmel.com \
    --cc=erik.waling@konftel.com \
    --cc=erik.waling@konftel.se \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox