diff options
author | Chris Cappuccio <chris@cvs.openbsd.org> | 2001-08-03 23:28:50 +0000 |
---|---|---|
committer | Chris Cappuccio <chris@cvs.openbsd.org> | 2001-08-03 23:28:50 +0000 |
commit | 59519dae154901d0ae9b372f7bb5ad3342fd71e6 (patch) | |
tree | 4caf64ba2810299060dda3c481a816e10448cb0b | |
parent | 0300545a34b0b9c390acfe754f716da8fba4dfdb (diff) |
Fix logic for detecting 82558 and newer chips in pci;
This driver allows large frames for those chips so set IFCAP_VLAN_MTU
for 82558+
-rw-r--r-- | sys/dev/ic/fxp.c | 11 | ||||
-rw-r--r-- | sys/dev/pci/if_fxp_pci.c | 10 |
2 files changed, 18 insertions, 3 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 39a250acd4b..7b022c0e36f 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.21 2001/07/18 19:32:01 mickey Exp $ */ +/* $OpenBSD: fxp.c,v 1.22 2001/08/03 23:28:49 chris Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -38,6 +38,7 @@ */ #include "bpfilter.h" +#include "vlan.h" #include <sys/param.h> #include <sys/systm.h> @@ -365,6 +366,14 @@ fxp_attach_common(sc, enaddr, intrstr) ifp->if_watchdog = fxp_watchdog; IFQ_SET_READY(&ifp->if_snd); +#if NVLAN > 0 + if (sc->not_82557) + ifp->if_capabilities |= IFCAP_VLAN_MTU; + /* + * Only 82558 and newer cards have a bit to ignore oversized frames. + */ +#endif + printf(": %s, address %s\n", intrstr, ether_sprintf(sc->arpcom.ac_enaddr)); diff --git a/sys/dev/pci/if_fxp_pci.c b/sys/dev/pci/if_fxp_pci.c index 68ad759e4c1..f363ea7de19 100644 --- a/sys/dev/pci/if_fxp_pci.c +++ b/sys/dev/pci/if_fxp_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fxp_pci.c,v 1.6 2001/06/13 23:19:16 jason Exp $ */ +/* $OpenBSD: if_fxp_pci.c,v 1.7 2001/08/03 23:28:49 chris Exp $ */ /* * Copyright (c) 1995, David Greenman @@ -161,9 +161,12 @@ fxp_pci_attach(parent, self, aux) switch (PCI_PRODUCT(pa->pa_id)) { case PCI_PRODUCT_INTEL_82562: sc->sc_flags |= FXPF_HAS_RESUME_BUG; + /* FALLTHROUGH */ + case PCI_PRODUCT_INTEL_82559: + case PCI_PRODUCT_INTEL_82559ER: sc->not_82557 = 1; break; - default: + case PCI_PRODUCT_INTEL_82557: /* * revisions * 2 = 82557 @@ -172,6 +175,9 @@ fxp_pci_attach(parent, self, aux) */ sc->not_82557 = (rev >= 4) ? 1 : 0; break; + default: + sc->not_82557 = 0; + break; } /* Do generic parts of attach. */ |