From: Jon Mason <jdmason@gmail.com>
To: Richard Ems <richard.ems@mtg-marinetechnik.de>
Cc: linux-kernel@vger.kernel.org, linux-net@vger.kernel.org
Subject: Re: PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" (Plain)
Date: Mon, 20 Dec 2004 14:31:48 -0600 [thread overview]
Message-ID: <892457750412201231461415a1@mail.gmail.com> (raw)
In-Reply-To: <41C713EF.8050003@mtg-marinetechnik.de>
[-- Attachment #1: Type: text/plain, Size: 4698 bytes --]
Dec 20 18:49:08 urutu kernel: eth1: HostError! IntStatus 0002. 202 143 8 7c2
Dec 20 18:54:15 urutu kernel: eth1: Tx timed out (d50080) 214 143 800 0
Dec 20 18:59:31 urutu kernel: eth1: Tx timed out (d30080) 212 143 800 0
With the above numbers corresponding to the current tx descriptor, the
current rx descriptor, the DMACtrl register, and the IntEnable
register.
I think we have the culprit. It appears that the adapter reset in the
function that contains HostError disables interrupts (which prevents
any rx from being serviced). I have a new patch which should
<crossing fingers> fix the problem (attached for easier patching). If
it doesn't work, it will fail the same way. Please apply it to the
original driver.
Thanks,
Jon
--- dl2k.c.orig 2004-12-20 13:59:47.123631016 -0600
+++ dl2k.c 2004-12-20 14:22:31.820165608 -0600
@@ -431,23 +431,14 @@ parse_eeprom (struct net_device *dev)
return 0;
}
-static int
-rio_open (struct net_device *dev)
+static void
+rio_up (struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
long ioaddr = dev->base_addr;
int i;
u16 macctrl;
- i = request_irq (dev->irq, &rio_interrupt, SA_SHIRQ, dev->name, dev);
- if (i)
- return i;
-
- /* Reset all logic functions */
- writew (GlobalReset | DMAReset | FIFOReset | NetworkReset | HostReset,
- ioaddr + ASICCtrl + 2);
- mdelay(10);
-
/* DebugCtrl bit 4, 5, 9 must set */
writel (readl (ioaddr + DebugCtrl) | 0x0230, ioaddr + DebugCtrl);
@@ -455,8 +446,6 @@ rio_open (struct net_device *dev)
if (np->jumbo != 0)
writew (MAX_JUMBO+14, ioaddr + MaxFrameSize);
- alloc_list (dev);
-
/* Get station address */
for (i = 0; i < 6; i++)
writeb (dev->dev_addr[i], ioaddr + StationAddr0 + i);
@@ -490,12 +479,6 @@ rio_open (struct net_device *dev)
ioaddr + MACCtrl);
}
- init_timer (&np->timer);
- np->timer.expires = jiffies + 1*HZ;
- np->timer.data = (unsigned long) dev;
- np->timer.function = &rio_timer;
- add_timer (&np->timer);
-
/* Start Tx/Rx */
writel (readl (ioaddr + MACCtrl) | StatsEnable | RxEnable | TxEnable,
ioaddr + MACCtrl);
@@ -507,10 +490,38 @@ rio_open (struct net_device *dev)
macctrl |= (np->rx_flow) ? RxFlowControlEnable : 0;
writew(macctrl, ioaddr + MACCtrl);
- netif_start_queue (dev);
-
/* Enable default interrupts */
EnableInt ();
+}
+
+static int
+rio_open (struct net_device *dev)
+{
+ struct netdev_private *np = netdev_priv(dev);
+ long ioaddr = dev->base_addr;
+ int i;
+
+ i = request_irq (dev->irq, &rio_interrupt, SA_SHIRQ, dev->name, dev);
+ if (i)
+ return i;
+
+ /* Reset all logic functions */
+ writew (GlobalReset | DMAReset | FIFOReset | NetworkReset | HostReset,
+ ioaddr + ASICCtrl + 2);
+ mdelay(10);
+
+ alloc_list (dev);
+
+ rio_up (dev);
+
+ init_timer (&np->timer);
+ np->timer.expires = jiffies + 1*HZ;
+ np->timer.data = (unsigned long) dev;
+ np->timer.function = &rio_timer;
+ add_timer (&np->timer);
+
+ netif_start_queue (dev);
+
return 0;
}
@@ -564,9 +575,11 @@ static void
rio_tx_timeout (struct net_device *dev)
{
long ioaddr = dev->base_addr;
+ struct netdev_private *np = dev->priv;
- printk (KERN_INFO "%s: Tx timed out (%4.4x), is buffer full?\n",
- dev->name, readl (ioaddr + TxStatus));
+ printk (KERN_INFO "%s: Tx timed out (%4.4x) %d %d %x %x\n",
+ dev->name, readl (ioaddr + TxStatus), np->cur_tx, np->cur_rx,
+ readl (ioaddr + MACCtrl), readw(ioaddr + IntEnable));
rio_free_tx(dev, 0);
dev->if_port = 0;
dev->trans_start = jiffies;
@@ -1007,10 +1020,13 @@ rio_error (struct net_device *dev, int i
/* PCI Error, a catastronphic error related to the bus interface
occurs, set GlobalReset and HostReset to reset. */
if (int_status & HostError) {
- printk (KERN_ERR "%s: HostError! IntStatus %4.4x.\n",
- dev->name, int_status);
+ printk (KERN_ERR "%s: HostError! IntStatus %4.4x. %d
%d %x %x\n",
+ dev->name, int_status, np->cur_tx, np->cur_rx,
+ readl (ioaddr + MACCtrl), readw(ioaddr + IntEnable));
writew (GlobalReset | HostReset, ioaddr + ASICCtrl + 2);
mdelay (500);
+
+ rio_up(dev);
}
}
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dl2k.patch --]
[-- Type: text/x-patch; name="dl2k.patch", Size: 3471 bytes --]
--- dl2k.c.orig 2004-12-20 13:59:47.123631016 -0600
+++ dl2k.c 2004-12-20 14:22:31.820165608 -0600
@@ -431,23 +431,14 @@ parse_eeprom (struct net_device *dev)
return 0;
}
-static int
-rio_open (struct net_device *dev)
+static void
+rio_up (struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
long ioaddr = dev->base_addr;
int i;
u16 macctrl;
- i = request_irq (dev->irq, &rio_interrupt, SA_SHIRQ, dev->name, dev);
- if (i)
- return i;
-
- /* Reset all logic functions */
- writew (GlobalReset | DMAReset | FIFOReset | NetworkReset | HostReset,
- ioaddr + ASICCtrl + 2);
- mdelay(10);
-
/* DebugCtrl bit 4, 5, 9 must set */
writel (readl (ioaddr + DebugCtrl) | 0x0230, ioaddr + DebugCtrl);
@@ -455,8 +446,6 @@ rio_open (struct net_device *dev)
if (np->jumbo != 0)
writew (MAX_JUMBO+14, ioaddr + MaxFrameSize);
- alloc_list (dev);
-
/* Get station address */
for (i = 0; i < 6; i++)
writeb (dev->dev_addr[i], ioaddr + StationAddr0 + i);
@@ -490,12 +479,6 @@ rio_open (struct net_device *dev)
ioaddr + MACCtrl);
}
- init_timer (&np->timer);
- np->timer.expires = jiffies + 1*HZ;
- np->timer.data = (unsigned long) dev;
- np->timer.function = &rio_timer;
- add_timer (&np->timer);
-
/* Start Tx/Rx */
writel (readl (ioaddr + MACCtrl) | StatsEnable | RxEnable | TxEnable,
ioaddr + MACCtrl);
@@ -507,10 +490,38 @@ rio_open (struct net_device *dev)
macctrl |= (np->rx_flow) ? RxFlowControlEnable : 0;
writew(macctrl, ioaddr + MACCtrl);
- netif_start_queue (dev);
-
/* Enable default interrupts */
EnableInt ();
+}
+
+static int
+rio_open (struct net_device *dev)
+{
+ struct netdev_private *np = netdev_priv(dev);
+ long ioaddr = dev->base_addr;
+ int i;
+
+ i = request_irq (dev->irq, &rio_interrupt, SA_SHIRQ, dev->name, dev);
+ if (i)
+ return i;
+
+ /* Reset all logic functions */
+ writew (GlobalReset | DMAReset | FIFOReset | NetworkReset | HostReset,
+ ioaddr + ASICCtrl + 2);
+ mdelay(10);
+
+ alloc_list (dev);
+
+ rio_up (dev);
+
+ init_timer (&np->timer);
+ np->timer.expires = jiffies + 1*HZ;
+ np->timer.data = (unsigned long) dev;
+ np->timer.function = &rio_timer;
+ add_timer (&np->timer);
+
+ netif_start_queue (dev);
+
return 0;
}
@@ -564,9 +575,11 @@ static void
rio_tx_timeout (struct net_device *dev)
{
long ioaddr = dev->base_addr;
+ struct netdev_private *np = dev->priv;
- printk (KERN_INFO "%s: Tx timed out (%4.4x), is buffer full?\n",
- dev->name, readl (ioaddr + TxStatus));
+ printk (KERN_INFO "%s: Tx timed out (%4.4x) %d %d %x %x\n",
+ dev->name, readl (ioaddr + TxStatus), np->cur_tx, np->cur_rx,
+ readl (ioaddr + MACCtrl), readw(ioaddr + IntEnable));
rio_free_tx(dev, 0);
dev->if_port = 0;
dev->trans_start = jiffies;
@@ -1007,10 +1020,13 @@ rio_error (struct net_device *dev, int i
/* PCI Error, a catastronphic error related to the bus interface
occurs, set GlobalReset and HostReset to reset. */
if (int_status & HostError) {
- printk (KERN_ERR "%s: HostError! IntStatus %4.4x.\n",
- dev->name, int_status);
+ printk (KERN_ERR "%s: HostError! IntStatus %4.4x. %d %d %x %x\n",
+ dev->name, int_status, np->cur_tx, np->cur_rx,
+ readl (ioaddr + MACCtrl), readw(ioaddr + IntEnable));
writew (GlobalReset | HostReset, ioaddr + ASICCtrl + 2);
mdelay (500);
+
+ rio_up(dev);
}
}
next prev parent reply other threads:[~2004-12-20 20:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200412171100.16601.richard.ems@mtg-marinetechnik.de>
2004-12-17 17:07 ` PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" Jon Mason
2004-12-17 17:15 ` PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" (Plain) Richard Ems
2004-12-17 18:05 ` Jon Mason
2004-12-17 20:52 ` Jon Mason
2004-12-20 9:42 ` PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" (Plain) (Plain) Richard Ems
2004-12-20 14:34 ` PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" Richard Ems
2004-12-20 17:12 ` Jon Mason
2004-12-20 18:03 ` PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" (Plain) Richard Ems
2004-12-20 20:31 ` Jon Mason [this message]
2004-12-21 9:51 ` PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" Richard Ems
2004-12-21 16:02 ` Jon Mason
2004-12-22 9:29 ` Richard Ems
2004-12-22 14:54 ` Jon Mason
2004-12-22 15:58 ` PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" (Plain) Richard Ems
2004-12-29 17:53 ` PROBLEM: Network hang: "eth0: Tx timed out (f0080), is buffer full?" Richard Ems
2005-01-04 21:32 ` Jon Mason
2005-01-04 22:09 ` Francois Romieu
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=892457750412201231461415a1@mail.gmail.com \
--to=jdmason@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
--cc=richard.ems@mtg-marinetechnik.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.