summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-05-20 03:47:57 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-05-20 03:47:57 +0000
commit27a017d60e3229f6c92f41f481cf12a9a8946cd5 (patch)
tree343f0e3be1beabb33f55fda747fe9215417976f5 /sys/dev/pci
parent976ca9a4c08c9df27f252e281d1c258357232ede (diff)
set if_jumbo_mtu and the IFCAP_JUMBO_MTU capabilities flag where
appropriate. ok reyk@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_bge.c7
-rw-r--r--sys/dev/pci/if_em.c9
-rw-r--r--sys/dev/pci/if_ixgb.c6
-rw-r--r--sys/dev/pci/if_lge.c4
-rw-r--r--sys/dev/pci/if_nfe.c6
-rw-r--r--sys/dev/pci/if_nge.c4
-rw-r--r--sys/dev/pci/if_sk.c5
-rw-r--r--sys/dev/pci/if_ti.c4
-rw-r--r--sys/dev/pci/if_vge.c7
-rw-r--r--sys/dev/pci/if_xge.c5
10 files changed, 37 insertions, 20 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 26480b6db06..bcad04001a4 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.144 2006/05/08 20:08:02 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.145 2006/05/20 03:47:56 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -1941,6 +1941,9 @@ bge_attach(struct device *parent, struct device *self, void *aux)
ifp->if_capabilities = IFCAP_VLAN_MTU;
+ if (BGE_IS_JUMBO_CAPABLE(sc))
+ ifp->if_capabilities |= IFCAP_JUMBO_MTU;
+
/*
* Do MII setup.
*/
@@ -2889,7 +2892,7 @@ bge_init(void *xsc)
ifp = &sc->arpcom.ac_if;
- /* Specify MTU. */
+ /* Specify MRU. */
if (BGE_IS_JUMBO_CAPABLE(sc))
CSR_WRITE_4(sc, BGE_RX_MTU,
ETHER_MAX_LEN_JUMBO + ETHER_VLAN_ENCAP_LEN);
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index c75eb848f96..341d1d7636f 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.120 2006/05/20 02:58:00 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.121 2006/05/20 03:47:56 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -1511,10 +1511,15 @@ em_setup_interface(struct em_softc *sc)
ifp->if_ioctl = em_ioctl;
ifp->if_start = em_start;
ifp->if_watchdog = em_watchdog;
+ if (sc->hw.mac_type != em_82573) {
+ ifp->if_jumbo_mtu =
+ sc->hw.max_frame_size - ETHER_HDR_LEN - ETHER_CRC_LEN;
+ ifp->if_capabilities |= IFCAP_JUMBO_MTU;
+ }
IFQ_SET_MAXLEN(&ifp->if_snd, sc->num_tx_desc - 1);
IFQ_SET_READY(&ifp->if_snd);
- ifp->if_capabilities = IFCAP_VLAN_MTU;
+ ifp->if_capabilities |= IFCAP_VLAN_MTU;
/*
* Specify the media types supported by this adapter and register
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c
index 1e30d5f3345..50a567d0d71 100644
--- a/sys/dev/pci/if_ixgb.c
+++ b/sys/dev/pci/if_ixgb.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_ixgb.c,v 1.14 2006/05/01 21:03:42 brad Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.15 2006/05/20 03:47:56 brad Exp $ */
#include <dev/pci/if_ixgb.h>
@@ -1034,10 +1034,12 @@ ixgb_setup_interface(struct ixgb_softc *sc)
ifp->if_ioctl = ixgb_ioctl;
ifp->if_start = ixgb_start;
ifp->if_watchdog = ixgb_watchdog;
+ ifp->if_jumbo_mtu =
+ IXGB_MAX_JUMBO_FRAME_SIZE - ETHER_HDR_LEN - ETHER_CRC_LEN;
IFQ_SET_MAXLEN(&ifp->if_snd, sc->num_tx_desc - 1);
IFQ_SET_READY(&ifp->if_snd);
- ifp->if_capabilities = IFCAP_VLAN_MTU;
+ ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU;
/*
* Specify the media types supported by this adapter and register
diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c
index a4acfad97ad..ad8bd5612a2 100644
--- a/sys/dev/pci/if_lge.c
+++ b/sys/dev/pci/if_lge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lge.c,v 1.39 2006/04/30 05:37:27 brad Exp $ */
+/* $OpenBSD: if_lge.c,v 1.40 2006/05/20 03:47:56 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -569,7 +569,7 @@ lge_attach(struct device *parent, struct device *self, void *aux)
DPRINTFN(5, ("bcopy\n"));
bcopy(sc->sc_dv.dv_xname, ifp->if_xname, IFNAMSIZ);
- ifp->if_capabilities = IFCAP_VLAN_MTU;
+ ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU;
if (CSR_READ_4(sc, LGE_GMIIMODE) & LGE_GMIIMODE_PCSENH)
sc->lge_pcs = 1;
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index 1e5ed34056d..e403caa68a6 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfe.c,v 1.57 2006/04/26 02:07:29 jsg Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.58 2006/05/20 03:47:56 brad Exp $ */
/*-
* Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -257,6 +257,10 @@ nfe_attach(struct device *parent, struct device *self, void *aux)
strlcpy(ifp->if_xname, sc->sc_dev.dv_xname, IFNAMSIZ);
ifp->if_capabilities = IFCAP_VLAN_MTU;
+
+ if (sc->sc_flags & NFE_USE_JUMBO)
+ ifp->if_capabilities |= IFCAP_JUMBO_MTU;
+
#if NVLAN > 0
if (sc->sc_flags & NFE_HW_VLAN)
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING;
diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c
index 8fcb70f4099..f6e22d327b8 100644
--- a/sys/dev/pci/if_nge.c
+++ b/sys/dev/pci/if_nge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nge.c,v 1.51 2006/03/25 22:41:45 djm Exp $ */
+/* $OpenBSD: if_nge.c,v 1.52 2006/05/20 03:47:56 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -890,7 +890,7 @@ nge_attach(parent, self, aux)
DPRINTFN(5, ("%s: bcopy\n", sc->sc_dv.dv_xname));
bcopy(sc->sc_dv.dv_xname, ifp->if_xname, IFNAMSIZ);
- ifp->if_capabilities = IFCAP_VLAN_MTU;
+ ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU;
#ifdef NGE_VLAN
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING;
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index 263e0783bd4..9c48007e585 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sk.c,v 1.107 2006/05/01 18:47:34 brad Exp $ */
+/* $OpenBSD: if_sk.c,v 1.108 2006/05/20 03:47:56 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1266,11 +1266,12 @@ sk_attach(struct device *parent, struct device *self, void *aux)
ifp->if_start = sk_start;
ifp->if_watchdog = sk_watchdog;
ifp->if_baudrate = 1000000000;
- ifp->if_capabilities |= IFCAP_VLAN_MTU;
IFQ_SET_MAXLEN(&ifp->if_snd, SK_TX_RING_CNT - 1);
IFQ_SET_READY(&ifp->if_snd);
bcopy(sc_if->sk_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
+ ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU;
+
/*
* Do miibus setup.
*/
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index dcb333b74c2..b7a2dd8fbc0 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ti.c,v 1.79 2006/03/25 22:41:45 djm Exp $ */
+/* $OpenBSD: if_ti.c,v 1.80 2006/05/20 03:47:56 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1652,7 +1652,7 @@ ti_attach(struct device *parent, struct device *self, void *aux)
IFQ_SET_READY(&ifp->if_snd);
bcopy(sc->sc_dv.dv_xname, ifp->if_xname, IFNAMSIZ);
- ifp->if_capabilities = IFCAP_VLAN_MTU;
+ ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU;
#if TI_VLAN
#if NVLAN > 0
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index 39852eed325..00901a78b0f 100644
--- a/sys/dev/pci/if_vge.c
+++ b/sys/dev/pci/if_vge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vge.c,v 1.20 2006/03/25 22:41:46 djm Exp $ */
+/* $OpenBSD: if_vge.c,v 1.21 2006/05/20 03:47:56 brad Exp $ */
/* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -785,8 +785,9 @@ vge_attach(struct device *parent, struct device *self, void *aux)
IFQ_SET_MAXLEN(&ifp->if_snd, VGE_IFQ_MAXLEN);
IFQ_SET_READY(&ifp->if_snd);
- ifp->if_capabilities = IFCAP_VLAN_MTU|IFCAP_CSUM_IPv4|
- IFCAP_CSUM_TCPv4|IFCAP_CSUM_UDPv4;
+ ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU |
+ IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 |
+ IFCAP_CSUM_UDPv4;
#ifdef VGE_VLAN
ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING;
diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c
index 13a0c44448b..c780236ee4f 100644
--- a/sys/dev/pci/if_xge.c
+++ b/sys/dev/pci/if_xge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xge.c,v 1.12 2006/05/15 00:41:51 brad Exp $ */
+/* $OpenBSD: if_xge.c,v 1.13 2006/05/20 03:47:56 brad Exp $ */
/* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */
/*
@@ -560,10 +560,11 @@ xge_attach(struct device *parent, struct device *self, void *aux)
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = xge_ioctl;
ifp->if_start = xge_start;
+ ifp->if_jumbo_mtu = XGE_MAX_MTU;
IFQ_SET_MAXLEN(&ifp->if_snd, NTXDESCS - 1);
IFQ_SET_READY(&ifp->if_snd);
- ifp->if_capabilities = IFCAP_VLAN_MTU;
+ ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_JUMBO_MTU;
/*
* Attach the interface.