Resent-Date: Mon, 1 Nov 1999 20:30:50 +0100 (MET)
X-Authentication-Warning: callisto.of.borg: geert owned process doing -bs
Date: Mon, 1 Nov 1999 20:30:16 +0100 (CET)
From: Geert Uytterhoeven <geert@linux-m68k.org>
Sender: geert@linux-m68k.org
To: Linux/m68k <linux-m68k@lists.linux-m68k.org>
Subject: Ariadne bug fix
Resent-From: linux-m68k@phil.uni-sb.de


Yes, bugs still exist ;-)

When you start or stop using using tcpdump, weird things happen dumping
`out-of-sync dirty pointer' and 'transmit timed out' messages. The reason for
this is a missing call to ariadne_init_ring() in set_multicast_list().
[ Actually I found this out a while ago thanks to my new job (Hi Jes :-) ]

I also tried to speed up the driver by using 32-bit copies in memcpyw(), but
this didn't gave a significant difference. After all the Ariadne is a (16 bit)
Zorro II device and Zorro is slow. Benchmarks (FTP to my Amiga 4000 from a
decent box with a DEC21041 Ethernet card):

  - put: ca. 260 KB/s
  - get: ca. 500 KB/s

If you wonder what's the difference between transmit and receive: transmit uses
memcpyw() to copy packets to the Am79C960 buffer, while receive uses
eth_copy_and_sum() to copy packets from the Am79C960 buffer. Using a bounce
buffer (memcpyw() to buffer, eth_copy_and_sum() from buffer) doesn't have much
influence on speed. So I suggest to leave it the way it is and blame everything
on the bad memory subsystem in the A3640.

--- m68k-2.3.22/drivers/net/ariadne.c.orig	Mon Nov  1 16:38:40 1999
+++ m68k-2.3.22/drivers/net/ariadne.c	Mon Nov  1 19:13:14 1999
@@ -812,6 +812,7 @@
     /* We take the simple way out and always enable promiscuous mode. */
     board->Lance.RAP = CSR0;	/* PCnet-ISA Controller Status */
     board->Lance.RDP = STOP;	/* Temporarily stop the lance. */
+    ariadne_init_ring(dev);
 
     if (dev->flags & IFF_PROMISC) {
 	/* Log any net taps. */


Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


