Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!news.moneng.mei.com!hookup!news.kei.com!MathWorks.Com!news.duke.edu!eff!news.umbc.edu!haven.umd.edu!umd5.umd.edu!mark From: mark@elea.umd.edu (Mark Sienkiewicz) Newsgroups: comp.os.386bsd.questions Subject: hack for if_ne.c (was Strange network stuff) Date: 13 May 1994 18:57:37 GMT Organization: Zeno, IPST, University of Maryland Lines: 36 Message-ID: <2r0ij1$8ti@umd5.umd.edu> References: <2qpr6c$dsh@agate.berkeley.edu> <2qrj5q$2h8@umd5.umd.edu> NNTP-Posting-Host: elea.umd.edu The problem is: Netbsd 0.9 with ne2000-type ethernet boards is observed to transmit 2 or 3 copies of each packet. The "solution" I've found is: Change sys/arch/i386/isa/if_ne.c as follows. Add the lines indicated by "-->". Near the top of neintr()... --> static ne_spin() --> { --> volatile int x; --> for (x=1000; x > 0; x--) --> ; --> } neintr(unit) { register struct ne_softc *ns = &ne_softc[unit]; u_char cmd,isr; register nec = ns->ns_port; --> ne_spin(); /* Save cmd, clear interrupt */ cmd = inb (nec+ds_cmd); Yes, it's a kludge, but it appears to work. Of course, I can only try this on my machine. When pinging from an HP 9000/715, I get 3 to 4 milliseconds for a response. Pinging an HP 9000/710 gets me 1 millisecond response. Since the BSD machine is a 20 Mhz 386, I think that's good enough. You might want to try tweaking the value in ne_spin() for your system.