Index: sys/dev/igc/if_igc.c =================================================================== --- sys/dev/igc/if_igc.c +++ sys/dev/igc/if_igc.c @@ -2000,6 +2000,7 @@ * Enable receive unit. * **********************************************************************/ +#define BSIZEPKT_ROUNDUP ((1< ETHERMTU) { - /* Set maximum packet len */ - if (adapter->rx_mbuf_sz <= 4096) { - srrctl |= 4096 >> IGC_SRRCTL_BSIZEPKT_SHIFT; - rctl |= IGC_RCTL_SZ_4096 | IGC_RCTL_BSEX; - } else if (adapter->rx_mbuf_sz > 4096) { - srrctl |= 8192 >> IGC_SRRCTL_BSIZEPKT_SHIFT; - rctl |= IGC_RCTL_SZ_8192 | IGC_RCTL_BSEX; - } psize = scctx->isc_max_frame_size; /* are we on a vlan? */ if (ifp->if_vlantrunk != NULL) psize += VLAN_TAG_SIZE; IGC_WRITE_REG(&adapter->hw, IGC_RLPML, psize); - } else { - srrctl |= 2048 >> IGC_SRRCTL_BSIZEPKT_SHIFT; - rctl |= IGC_RCTL_SZ_2048; } + /* Set maximum packet buffer len */ + srrctl |= (adapter->rx_mbuf_sz + BSIZEPKT_ROUNDUP) >> + IGC_SRRCTL_BSIZEPKT_SHIFT; + /* srrctl above overrides this but set the register to a sane value */ + rctl |= IGC_RCTL_SZ_2048; + /* * If TX flow control is disabled and there's >1 queue defined, * enable DROP.