Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 2014 05:00:52 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org
Subject:   svn commit: r265128 - stable/4/sys/i386/isa
Message-ID:  <201404300500.s3U50r0Y041641@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Wed Apr 30 05:00:52 2014
New Revision: 265128
URL: http://svnweb.freebsd.org/changeset/base/265128

Log:
  Fix lnc0 detection in VMware when PXE booting.
  This is a direct commit to stable/4 since lnc(4) was deprecated
  and does not exist beyond this branch.
  
  Submitted by:	Paul Meng <mirnshi@163.com>
  PR:		kern/77982

Modified:
  stable/4/sys/i386/isa/if_lnc.c

Modified: stable/4/sys/i386/isa/if_lnc.c
==============================================================================
--- stable/4/sys/i386/isa/if_lnc.c	Wed Apr 30 04:44:51 2014	(r265127)
+++ stable/4/sys/i386/isa/if_lnc.c	Wed Apr 30 05:00:52 2014	(r265128)
@@ -114,6 +114,7 @@ struct lnc_softc {
 	int rap;
 	int rdp;
 	int bdp;
+	int reset;
 #ifdef DEBUG
 	int lnc_debug;
 #endif
@@ -1120,6 +1121,7 @@ pcnet_probe(struct lnc_softc *sc)
 {
 	u_long chip_id;
 	int type;
+	int reset_val;
 
 	/*
 	 * The PCnet family don't reset the RAP register on reset so we'll
@@ -1127,6 +1129,8 @@ pcnet_probe(struct lnc_softc *sc)
 	 * though so the probe is just a matter of reading it.
 	 */
 
+	reset_val = inw(sc->reset);
+	outw(reset_val, sc->reset);
 	if ((type = lance_probe(sc))) {
 		chip_id = read_csr(sc, CSR89);
 		chip_id <<= 16;
@@ -1293,6 +1297,7 @@ lnc_attach_ne2100_pci(int unit, unsigned
 		sc->rap = iobase + PCNET_RAP;
 		sc->rdp = iobase + PCNET_RDP;
 		sc->bdp = iobase + PCNET_BDP;
+		sc->reset = iobase + PCNET_RESET;
 
 		sc->nic.ic = pcnet_probe(sc);
 		if (sc->nic.ic >= PCnet_32) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404300500.s3U50r0Y041641>