Re: via-rhine timeouts

From: Martin Eriksson (nitrax@giron.wox.org)
Date: Thu Jan 24 2002 - 03:38:40 EST


----- Original Message -----
From: "Justin A" <justin@bouncybouncy.net>
To: "Andrew Morton" <akpm@zip.com.au>
Cc: "Urban Widmark" <urban@teststation.com>; "Martin Eriksson"
<nitrax@giron.wox.org>; "Andy Carlson" <naclos@swbell.net>;
<linux-kernel@vger.kernel.org>; "Stephan von Krawczynski" <skraw@ithnet.com>
Sent: Thursday, January 24, 2002 12:41 AM
Subject: Re: via-rhine timeouts

> I don't think thats the full problem, I just noticed I had been getting
> errors too with the via driver, but it's been working fine otherwise:
>
> (heres all of them, don't know what was going on at all the times, but I
> was browsing the web for a bit at 9:50)
>
> Jan 23 00:56:56 bouncybouncy kernel: eth0: Transmit error, Tx status 8100.
<snip>
>
> the status makes sense from what I can tell, I could never figure out
> what 782d was.
> ifconfig reports:
> TX packets:657170 errors:52 dropped:0 overruns:0 carrier:52
>
> Is it possible that the problem is with the hub and via-rhine resetting
> the card repetedly just makes it worse?

Hmm, if I'm not wrong, it seems that the linuxfet driver is doing some
strange hack on txstatus 0x0800 and 0x0100. Instead of waiting for
netdev_error to handle things it does its own stuff:

np->tx_ring[entry].tx_status = cpu_to_le32(DescOwn);
writel(virt_to_bus(&np->tx_ring[entry]), ioaddr + TxRingPtr);
/* Turn on Tx On*/
writew(CmdTxOn | np->chip_cmd, dev->base_addr + ChipCmd);
/* Stats counted in Tx-done handler, just restart Tx. */
writew(CmdTxDemand | np->chip_cmd, dev->base_addr + ChipCmd);

What differs from the normal error handler is the "CmdTxOn" command I guess.
But I am also seeing that they have removed any entry from "if (intr_status
& IntrTxAbort) {" in "netdev_error". Might 0x0100 be the new secret abort
code?

What if you tried (or at least reviewed) this patch: (also attached, as OE
foggs opp whitespace)

--- via-rhine.c.orig Fri Dec 21 18:41:54 2001
+++ via-rhine.c Thu Jan 24 09:30:42 2002
@@ -1264,7 +1264,7 @@

   /* Abnormal error summary/uncommon events handlers. */
   if (intr_status & (IntrPCIErr | IntrLinkChange | IntrMIIChange |
- IntrStatsMax | IntrTxAbort | IntrTxUnderrun))
+ IntrStatsMax | IntrTxAbort | IntrTxUnderrun | 0x0100))
    via_rhine_error(dev, intr_status);

   if (--boguscnt < 0) {
@@ -1481,8 +1481,14 @@
    printk(KERN_INFO "%s: Transmitter underrun, increasing Tx "
        "threshold setting to %2.2x.\n", dev->name, np->tx_thresh);
  }
+ if (intr_status & 0x0100) {
+ /* VIA hack */
+ writew(CmdTxOn | np->chip_cmd, dev->base_addr + ChipCmd);
+ /* Restart Tx */
+ writew(CmdTxDemand | np->chip_cmd, dev->base_addr + ChipCmd);
+ }
  if ((intr_status & ~( IntrLinkChange | IntrStatsMax |
- IntrTxAbort | IntrTxAborted))) {
+ IntrTxAbort | IntrTxAborted | 0x0100))) {
   if (debug > 1)
    printk(KERN_ERR "%s: Something Wicked happened! %4.4x.\n",
       dev->name, intr_status);

 _____________________________________________________
| Martin Eriksson <nitrax@giron.wox.org>
| MSc CSE student, department of Computing Science
| Umeå University, Sweden

- ABIT BP6(RU) - 2xCeleron 400 - 128MB/PC100/C2 Acer
- Maxtor 10/5400/U33 HPT P/M - Seagate 6/5400/DMA2 HPT S/M
- 2xDE-530TX - 1xTulip - Linux 2.4.17+ide+preempt



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:18 EST