public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: David Johnson <dj@david-web.co.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 8139too not working in 2.6
Date: Tue, 27 Apr 2004 00:53:39 +0900	[thread overview]
Message-ID: <873c6qrb0c.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <200404261526.00971.dj@david-web.co.uk>

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

David Johnson <dj@david-web.co.uk> writes:

> Attached is my dmesg, lspci and the output of dump_pirq.pl.
> This was when running 2.6.6-rc1.

Looks like 8139too still isn't loaded. Could you apply the attached
patch, and send the output of dmesg after the problem was happened?

I'd like to see the debugging message of rtl8139_tx_timeout().

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 8139too-useful-txtimeout.patch --]
[-- Type: text/x-patch, Size: 2377 bytes --]


[PATCH] 8139too: more useful debug info for tx_timeout

	/* disable Tx ASAP, if not already */
	tmp8 = RTL_R8 (ChipCmd);
	if (tmp8 & CmdTxEnb)
		RTL_W8 (ChipCmd, CmdRxEnb);

The above will clear the Tx Descs. So, this prints the debugging info
before rtl8139_tx_timeout() does it. And IntrStatus etc. also prints
anytime for the debug.


---

 drivers/net/8139too.c |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff -puN drivers/net/8139too.c~8139too-useful-txtimeout drivers/net/8139too.c
--- linux-2.6.6-rc2/drivers/net/8139too.c~8139too-useful-txtimeout	2004-04-22 02:14:42.000000000 +0900
+++ linux-2.6.6-rc2-hirofumi/drivers/net/8139too.c	2004-04-22 02:14:42.000000000 +0900
@@ -1677,11 +1677,17 @@ static void rtl8139_tx_timeout (struct n
 	u8 tmp8;
 	unsigned long flags;
 
-	DPRINTK ("%s: Transmit timeout, status %2.2x %4.4x "
-		 "media %2.2x.\n", dev->name,
-		 RTL_R8 (ChipCmd),
-		 RTL_R16 (IntrStatus),
-		 RTL_R8 (MediaStatus));
+	printk (KERN_DEBUG "%s: Transmit timeout, status %2.2x %4.4x %4.4x "
+		"media %2.2x.\n", dev->name, RTL_R8 (ChipCmd),
+		RTL_R16(IntrStatus), RTL_R16(IntrMask), RTL_R8(MediaStatus));
+	/* Emit info to figure out what went wrong. */
+	printk (KERN_DEBUG "%s: Tx queue start entry %ld  dirty entry %ld.\n",
+		dev->name, tp->cur_tx, tp->dirty_tx);
+	for (i = 0; i < NUM_TX_DESC; i++)
+		printk (KERN_DEBUG "%s:  Tx descriptor %d is %8.8lx.%s\n",
+			dev->name, i, RTL_R32 (TxStatus0 + (i * 4)),
+			i == tp->dirty_tx % NUM_TX_DESC ?
+				" (queue head)" : "");
 
 	tp->xstats.tx_timeouts++;
 
@@ -1694,15 +1700,6 @@ static void rtl8139_tx_timeout (struct n
 	/* Disable interrupts by clearing the interrupt mask. */
 	RTL_W16 (IntrMask, 0x0000);
 
-	/* Emit info to figure out what went wrong. */
-	printk (KERN_DEBUG "%s: Tx queue start entry %ld  dirty entry %ld.\n",
-		dev->name, tp->cur_tx, tp->dirty_tx);
-	for (i = 0; i < NUM_TX_DESC; i++)
-		printk (KERN_DEBUG "%s:  Tx descriptor %d is %8.8lx.%s\n",
-			dev->name, i, RTL_R32 (TxStatus0 + (i * 4)),
-			i == tp->dirty_tx % NUM_TX_DESC ?
-				" (queue head)" : "");
-
 	/* Stop a shared interrupt from scavenging while we are. */
 	spin_lock_irqsave (&tp->lock, flags);
 	rtl8139_tx_clear (tp);
@@ -1714,7 +1711,6 @@ static void rtl8139_tx_timeout (struct n
 		netif_wake_queue (dev);
 	}
 	spin_unlock(&tp->rx_lock);
-	
 }
 
 

_

  reply	other threads:[~2004-04-26 15:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 11:35 8139too not working in 2.6 Mirko Caserta
2004-04-26 11:41 ` David Johnson
2004-04-26 12:14   ` MNH
2004-04-26 13:29   ` Gene Heskett
2004-04-26 14:26   ` David Johnson
2004-04-26 15:53     ` OGAWA Hirofumi [this message]
2004-04-26 12:05 ` Jorge Bernal (Koke)
2004-04-26 12:13   ` David Johnson
2004-04-26 16:01     ` Jorge Bernal
2004-04-26 12:41 ` Derek Chen-Becker
2004-04-26 12:58 ` OGAWA Hirofumi
2004-04-26 14:46   ` Mirko Caserta
2004-04-26 15:14     ` OGAWA Hirofumi
2004-04-26 15:37       ` 8139too not working in 2.6 (works now) Mirko Caserta
2004-04-26 16:11         ` OGAWA Hirofumi

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=873c6qrb0c.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=dj@david-web.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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