summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-01-05 00:59:08 +0000
committerwpaul <wpaul@FreeBSD.org>1999-01-05 00:59:08 +0000
commit169d9aa40517d0edd12b626c3f37bd10f5caca72 (patch)
treee338b1b5a1bc9c0abde7ddfc54d56931c86f4eee
parent6abb5831186d3538e25c374d63ef754cedc8e2dd (diff)
downloadFreeBSD-src-169d9aa40517d0edd12b626c3f37bd10f5caca72.zip
FreeBSD-src-169d9aa40517d0edd12b626c3f37bd10f5caca72.tar.gz
GRRRR! Apparently, the promiscuous mode chip bug which I thought was
isolated to revision 33 PNIC chips is also present in revision 32 chips. Cards with rev. 32 chips include the LinkSys LNE100TX and the Matrox FastNIC 10/100. This accounts for all the cards that I have to test with. (I was never able to personally trip the bug on this chip rev, but today one of the guys in the lab did it with the software they're working on for their cellular IP project, which uses BPF and promiscuous mode extensively.) This commit enables the promiscuous mode software workaround code for both revison 32 and revision 33 chips. It's possible all of the PNIC chips suffer from this bug, but these are the only two revs where I know for a fact it exists.
-rw-r--r--sys/pci/if_pn.c6
-rw-r--r--sys/pci/if_pnreg.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/pci/if_pn.c b/sys/pci/if_pn.c
index 843d6157..bc413c7 100644
--- a/sys/pci/if_pn.c
+++ b/sys/pci/if_pn.c
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_pn.c,v 1.35 1998/12/31 16:51:01 wpaul Exp $
+ * $Id: if_pn.c,v 1.36 1999/01/05 00:47:25 wpaul Exp $
*/
/*
@@ -97,7 +97,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: if_pn.c,v 1.35 1998/12/31 16:51:01 wpaul Exp $";
+ "$Id: if_pn.c,v 1.36 1999/01/05 00:47:25 wpaul Exp $";
#endif
/*
@@ -913,7 +913,7 @@ pn_attach(config_id, unit)
#ifdef PN_PROMISC_BUG_WAR
revision = pci_conf_read(config_id, PN_PCI_REVISION) & 0x000000FF;
- if (revision == PN_169B_REV) {
+ if (revision == PN_169B_REV || revision == PN_169_REV) {
sc->pn_promisc_war = 1;
sc->pn_promisc_buf = malloc(PN_RXLEN * 5, M_DEVBUF, M_NOWAIT);
if (sc->pn_promisc_buf == NULL) {
diff --git a/sys/pci/if_pnreg.h b/sys/pci/if_pnreg.h
index b37da2d..e364409 100644
--- a/sys/pci/if_pnreg.h
+++ b/sys/pci/if_pnreg.h
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_pnreg.h,v 1.15 1998/12/31 16:51:01 wpaul Exp $
+ * $Id: if_pnreg.h,v 1.16 1999/01/05 00:47:25 wpaul Exp $
*/
/*
@@ -442,6 +442,7 @@ struct pn_softc {
u_int8_t pn_autoneg;
caddr_t pn_ldata_ptr;
#ifdef PN_PROMISC_BUG_WAR
+#define PN_169_REV 32
#define PN_169B_REV 33
u_int8_t pn_promisc_war;
struct pn_chain_onefrag *pn_promisc_bug_save;
OpenPOWER on IntegriCloud