Date: Sat, 8 Jun 1996 13:46:16 +0200 From: Torsten Koehler <tk@pars.sics.se> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/1302: 3COM 3c590 can't receive packets Message-ID: <199606081146.NAA04039@pars.sics.se> Resent-Message-ID: <199606081150.EAA04602@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1302 >Category: kern >Synopsis: 3COM 3c590 can't receive packets >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jun 8 04:50:02 PDT 1996 >Last-Modified: >Originator: Torsten Koehler >Organization: SICS >Release: FreeBSD 2.2-960501-SNAP i386 >Environment: 3Com 3c590 EtherLink III PCI rev 0, Pentium PC. >Description: With increasing packet sizes the rate of received packet goes to zero. Packet sizes around 100 bytes are ok, at 250 bytes only every 5th packet gets received, at 500 bytes every 20th and so on. >How-To-Repeat: ping -s 100 host # ok ping -s 1000 host # no response >Fix: It looks like that the calculation of RX_EARLY_THRESH in pci/if_vx.c goes wrong. One hack is to disable all SET_RX_EARLY_THRESH commands. After disabling SET_RX_EARLY_THRESH the card is able to receive packets of all sizes, but with a high input error rate. Which isn't really nice either, but 15% packet loss is still better than receiving every 15th packet ... Also, not using RX_EARLY interrupts might increase the change of locking the device driver in IFF_OACTIVE state due to lost RX_COMPLETE interrupts (the LINUX driver mentions that problem). Does somebody has a hardware spec for the 3COM 3c590 ? *** if_vx.c Fri Jun 7 23:57:42 1996 --- ../if_vx.c.test Sat Jun 8 13:07:36 1996 *************** *** 29,34 **** --- 29,36 ---- * */ + #define VX_NO_RX_EARLY + /* * Created from if_ep.c driver by Fred Gray (fgray@rice.edu) to support * the 3c590 family. *************** *** 440,446 **** --- 442,450 ---- m_freem(sc->top); sc->top = sc->mcur = 0; } + #ifndef VX_NO_RX_EARLY outw(BASE + VX_COMMAND, SET_RX_EARLY_THRESH | sc->rx_early_thresh); + #endif /* * These clever computations look very interesting *************** *** 847,854 **** --- 851,860 ---- if (delta < MIN_RX_EARLY_THRESHL) delta = MIN_RX_EARLY_THRESHL; + #ifndef VX_NO_RX_EARLY outw(BASE + VX_COMMAND, SET_RX_EARLY_THRESH | (sc->rx_early_thresh = delta)); + #endif return; } all_pkt: *************** *** 897,904 **** --- 903,912 ---- #ifdef VX_LOCAL_STATS sc->rx_bpf_disc++; #endif + #ifndef VX_NO_RX_EARLY while (inw(BASE + VX_STATUS) & S_COMMAND_IN_PROGRESS); outw(BASE + VX_COMMAND, SET_RX_EARLY_THRESH | delta); + #endif return; } } *************** *** 910,917 **** --- 918,927 ---- if (!sc->mb[sc->next_mb]) vxmbuffill((caddr_t) sc, 0); sc->top = 0; + #ifndef VX_NO_RX_EARLY while (inw(BASE + VX_STATUS) & S_COMMAND_IN_PROGRESS); outw(BASE + VX_COMMAND, SET_RX_EARLY_THRESH | delta); + #endif return; out: *************** *** 928,936 **** --- 938,948 ---- delta = MIN_RX_EARLY_THRESHF; vx_fset(F_RX_FIRST); vx_frst(F_RX_TRAILER); + #ifndef VX_NO_RX_EARLY while (inw(BASE + VX_STATUS) & S_COMMAND_IN_PROGRESS); outw(BASE + VX_COMMAND, SET_RX_EARLY_THRESH | (sc->rx_early_thresh = delta)); + #endif } /* >Audit-Trail: >Unformatted: Torsten Koehler
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606081146.NAA04039>