*BSD News Article 73366


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@awfulhak.demon.co.uk (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: problem with 3c590
Date: 10 Jul 1996 16:22:05 +0100
Organization: Coverform Ltd.
Lines: 58
Message-ID: <4s0hqt$a6@anorak.coverform.lan>
References: <4rf9u3$7vp@news.uit.no> <4rl1vb$u3@anorak.coverform.lan> <4rt0bd$4fl@uriah.heep.sax.de>
NNTP-Posting-Host: localhost.coverform.lan
X-NNTP-Posting-Host: awfulhak.demon.co.uk
X-Newsreader: TIN [version 1.2 PL2]

J Wunsch (j@uriah.heep.sax.de) wrote:
: brian@awfulhak.demon.co.uk (Brian Somers) wrote:

: > : The card is a 10Mbit 3c590 pci combo using the BNC adapter.
: > 
: > : When sending data fast, it stops sending. 

: > The card receives data at the same time as sending and ends up producing
: > only one interrupt for both events (I've had such problems writing serial
: > stuff before - 8250s seem to do this).  The driver ends up not knowing
: > that the data was sent - hence the slow throughput and eventual fill-up.

: The `vx' driver is, umm, suboptimal in design and implementation.

: Somebody on the mailing list suggested the following change:

: Index: pci/if_vx.c
: ===================================================================
: RCS file: /usr/home/cvs/src/sys/pci/if_vx.c,v
: retrieving revision 1.10
: diff -u -u -r1.10 if_vx.c
: --- if_vx.c	1996/06/12 05:10:42	1.10
: +++ if_vx.c	1996/06/16 14:45:12
: @@ -518,7 +518,7 @@
:      }
:      IF_DEQUEUE(&sc->arpcom.ac_if.if_snd, m);
:  
: -    outw(BASE + VX_W1_TX_PIO_WR_1, len);
: +    outw(BASE + VX_W1_TX_PIO_WR_1, len | 0x8000 /* XXX */);
:      outw(BASE + VX_W1_TX_PIO_WR_1, 0x0);	/* Second dword meaningless */
:  
:      /* compute the Tx start threshold for this packet */


: This might or might not help -- i'm still not happy with the driver at
: all, and switched back to the 3C503 since i needed a reliable Ethernet
: connection to get an NFS diskless client booted.

I'm actually using the nep driver (similar to ep) from the guys in Japan.
Somebody sent me email saying that this was the correct thing to do - I
tried it, but I'd almost bet that I wrote

   outw(BASE + VX_W1_TX_PIO_WR_1, len & (1 << 14 ) );

I keep doing this.... in fact, when I read your patch above, I thought
*you'd* got it wrong... sad.  Needless to say, *my* (incorrect) patch
didn't work - lots of zero length packets I suspect..... :-(

One thing about this, outw() is passed an int, not an unsigned.  It's
strange that the card wants a 2s compliment number with the top bit
set.... but it certainly doesn't want a 1s compliment number, so it's
correct - just wierd IMHO.

I'll check out the (correct) patch this evening :-)

--
Brian <brian@awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour....