summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/if_et.c11
-rw-r--r--sys/dev/pci/if_lii.c5
2 files changed, 7 insertions, 9 deletions
diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c
index bc6f8092ea4..080f1809ec8 100644
--- a/sys/dev/pci/if_et.c
+++ b/sys/dev/pci/if_et.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_et.c,v 1.23 2014/07/22 13:12:11 mpi Exp $ */
+/* $OpenBSD: if_et.c,v 1.24 2014/08/30 09:52:13 brad Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
@@ -1264,9 +1264,9 @@ et_chip_init(struct et_softc *sc)
/*
* Split internal memory between TX and RX according to MTU
*/
- if (ifp->if_mtu < 2048)
+ if (ifp->if_hardmtu < 2048)
rxq_end = 0x2bc;
- else if (ifp->if_mtu < 8192)
+ else if (ifp->if_hardmtu < 8192)
rxq_end = 0x1ff;
else
rxq_end = 0x1b3;
@@ -1513,8 +1513,7 @@ et_init_mac(struct et_softc *sc)
CSR_WRITE_4(sc, ET_MAC_ADDR2, val);
/* Set max frame length */
- CSR_WRITE_4(sc, ET_MAX_FRMLEN,
- ETHER_HDR_LEN + EVL_ENCAPLEN + ifp->if_mtu + ETHER_CRC_LEN);
+ CSR_WRITE_4(sc, ET_MAX_FRMLEN, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN);
/* Bring MAC out of reset state */
CSR_WRITE_4(sc, ET_MAC_CFG1, 0);
@@ -1555,7 +1554,7 @@ et_init_rxmac(struct et_softc *sc)
CSR_WRITE_4(sc, ET_UCAST_FILTADDR2, 0);
CSR_WRITE_4(sc, ET_UCAST_FILTADDR3, 0);
- if (ifp->if_mtu > 8192) {
+ if (ifp->if_hardmtu > 8192) {
/*
* In order to transmit jumbo packets greater than 8k,
* the FIFO between RX MAC and RX DMA needs to be reduced
diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c
index 8ef621796d9..df3ac451d9e 100644
--- a/sys/dev/pci/if_lii.c
+++ b/sys/dev/pci/if_lii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lii.c,v 1.32 2013/12/28 03:34:54 deraadt Exp $ */
+/* $OpenBSD: if_lii.c,v 1.33 2014/08/30 09:52:13 brad Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation.
@@ -674,8 +674,7 @@ lii_init(struct ifnet *ifp)
/* 500000 means 100ms */
LII_WRITE_2(sc, LII_IALTIV, 50000);
- LII_WRITE_4(sc, LII_MTU, ifp->if_mtu + ETHER_HDR_LEN
- + ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN);
+ LII_WRITE_4(sc, LII_MTU, ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN);
/* unit unknown for TX cur-through threshold */
LII_WRITE_4(sc, LII_TX_CUT_THRESH, 0x177);