Re: lnc0 in VmWare doesn't work

From: Doug Ambrisko <ambrisko_at_ambrisko.com>
Date: Sun, 15 Aug 2004 12:25:34 -0700 (PDT)
FYI, if you are using a newer version of vmware we ran into a bug in
which the virtual NICs are reset as the system boots up.  So once
interrupts are enabled you get a "storm" of packets ignored by driver.
Here is a patch for -stable that should be close for -current etc.

Index: sys/i386/isa/if_lnc.c
===================================================================
RCS file: /usr/local/cvsroot/freebsd/src/sys/i386/isa/Attic/if_lnc.c,v
retrieving revision 1.68.2.5
diff -u -p -r1.68.2.5 if_lnc.c
--- sys/i386/isa/if_lnc.c	13 Feb 2002 00:43:10 -0000	1.68.2.5
+++ sys/i386/isa/if_lnc.c	24 Mar 2004 16:12:00 -0000
_at__at_ -1244,6 +1244,8 _at__at_ lnc_attach_sc(struct lnc_softc *sc, int 
 
 	ether_ifattach(&sc->arpcom.ac_if, ETHER_BPF_SUPPORTED);
 
+	lnc_init(sc);
+
 	printf("lnc%d: ", unit);
 	if (sc->nic.ic == LANCE || sc->nic.ic == C_LANCE)
 		printf("%s (%s)",
_at__at_ -1338,6 +1340,8 _at__at_ lnc_init(xsc)
 
 	s = splimp();
 	lnc_stop(sc);
+	inw(sc->rdp + PCNET_RESET - PCNET_RDP);
+	outw(sc->rdp + PCNET_RESET - PCNET_RDP, 0);
 	sc->arpcom.ac_if.if_flags |= IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; /* XXX??? */
 
 	/*

Doug A.
Received on Sun Aug 15 2004 - 17:25:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:06 UTC