summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ix.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-12-20 17:07:38 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-12-20 17:07:38 +0000
commita2fc52526f4698d74bb96fe0b079faaa19c41ec9 (patch)
tree0b1085ce27fd240aa0564c517d1d0c6c2c5509d6 /sys/dev/pci/if_ix.c
parent601b21f55e3616e402e575fa6be74bee2d980e56 (diff)
max_frame_size must be set after ether_ifattach updates if_mtu;
verified with the upstream driver
Diffstat (limited to 'sys/dev/pci/if_ix.c')
-rw-r--r--sys/dev/pci/if_ix.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index 6cc8ff5cb91..55cc95981c3 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.85 2012/12/17 18:30:28 mikeb Exp $ */
+/* $OpenBSD: if_ix.c,v 1.86 2012/12/20 17:07:37 mikeb Exp $ */
/******************************************************************************
@@ -1600,9 +1600,6 @@ ixgbe_setup_interface(struct ix_softc *sc)
ifp->if_capabilities |= IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;
#endif
- sc->max_frame_size =
- ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
-
/*
* Specify the media types supported by this sc and register
* callbacks to update media and link information
@@ -1623,6 +1620,9 @@ ixgbe_setup_interface(struct ix_softc *sc)
if_attach(ifp);
ether_ifattach(ifp);
+
+ sc->max_frame_size =
+ ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
}
void
@@ -2526,7 +2526,6 @@ ixgbe_get_buf(struct rx_ring *rxr, int i)
return (ENOBUFS);
mp->m_len = mp->m_pkthdr.len = sc->rx_mbuf_sz;
- /* only adjust if this is not a split header */
if (sc->max_frame_size <= (sc->rx_mbuf_sz - ETHER_ALIGN))
m_adj(mp, ETHER_ALIGN);