Subject: Re: Network trouble (3C590 NIC needs patch under NetBSD-1.2)
To: Stephane Gaubert <gaubert@cnam.fr>
From: Jonathan Marsden <Jonathan@XC.Org>
List: netbsd-help
Date: 03/18/1997 13:24:56
On 18 Mar 1997, Stephane Gaubert writes:

> I just installed NetBSD 1.2 i386 on a Dell OptiPlex GS+ with 128 Mo of
> RAM and which has two network adapters : one 3c509 TP on the motherboard
> and one 3c590 combo in a PCI slot.

> ...

> ping: sendto: No buffer space available

> ...

> The only way to unlock the situation is to put the interface down then
> up again.
> 
> Can somone please tell me how I can fix this problem ?

The 3C59X code in NetBSD 1.2 ned a patch.  This was discussed in
netbsd-help some weeks back and I mailed the patch to the user asking
then.  This time I'll mail it to the list so it gets into the archive. 

This patch is already in 1.2-current.  I found it in one of the bug
archives, on www.flame.org I think?  It worked fine for me and for at
least one other person (Stefan Brandle?  I forget!) who asked about it
here.  BTW I use it on a Dell machine also.

Blessings,

Jonathan
--
Jonathan Marsden   | Internet: jonathan@xc.org  | Making electronic 
1849 N. Wabash Ave.| Phone: +1 (909) 794 1151   | communications work 
Redlands, CA 92374 | FAX:   +1 (909) 794 3016   | reliably for Christian 
USA                | http://www.xc.org/jonathan | missions worldwide 
------------------------------------------------------------------------

Index: elink3.c
===================================================================
RCS file: /usr2/CVSRoot/netbsd/src/sys/dev/ic/elink3.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -r1.1.1.1 -r1.2
147a148,176
>       /*
>        * 100 Mbps cards allow 4500 byte packets, which an 11-bit address
>        * isn't big enough to hold. In commands to these cards we give the
>        * packet size in 32-bit words. To detect these cards, we write a
>        * transmit threshold and see if it was interpreted as bytes or as
>        * words. This idea is from Tom Killian (tom@research.att.com)).
>        */
>       bus_io_write_2(bc, ioh, EP_COMMAND, SET_TX_AVAIL_THRESH | 1800 );
>       GO_WINDOW(5);
>       i = bus_io_read_2(bc, ioh, EP_W5_TX_AVAIL_THRESH);
>       GO_WINDOW(1);
>       switch (i)  {
>
>       case 1800:
>               sc->txashift = 0;
>               break;
>
>       case 7200:
>               sc->txashift = 2;
>               break;
>
>       default:
>               printf("%s: TX_AVAIL_THRESH = %d; interface disabled",
>                   sc->sc_dev.dv_xname, (int) i);
>               return;
>       }
>       printf("%s: shifting address bits by %d\n", sc->sc_dev.dv_xname,
>           (int) sc->txashift);        /* XXX remove later */
>
341c370
<                   SET_TX_AVAIL_THRESH | (len + pad + 4));
---
>                   SET_TX_AVAIL_THRESH | ((len + pad + 4) >> sc->txashift) );
345a375
>               /* disable txAvailable interrupt */
347c377
<                   SET_TX_AVAIL_THRESH | 2044);
---
>                   SET_TX_AVAIL_THRESH | 2047 );
Index: elink3reg.h
===================================================================
RCS file: /usr2/CVSRoot/netbsd/src/sys/dev/ic/elink3reg.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1
diff -r1.1.1.1 -r1.1
Index: elink3var.h
===================================================================
RCS file: /usr2/CVSRoot/netbsd/src/sys/dev/ic/elink3var.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -r1.1.1.1 -r1.2
50a51
>       u_char  txashift;               /* shift packet size in cards w/ large packets */