svn commit: r217435 - stable/8/sys/dev/re

Pyun YongHyeon yongari at
Sat Jan 15 00:32:16 UTC 2011

Author: yongari
Date: Sat Jan 15 00:32:15 2011
New Revision: 217435

  MFC r217296:
    For re(4) controllers that uses new jumbo frame scheme(RTL8168C/D/E),
    limit maximum RX buffer size to RE_RX_DESC_BUFLEN instead of
    blindly configuring it to 16KB. Due to lack of documentation, re(4)
    didn't allow jumbo frame on these controllers. However it seems
    controller is confused with jumbo frame such that it can DMA the
    received frame to wrong address instead of splitting it into
    multiple RX buffers. Of course, this caused panic.
    Since re(4) does not support jumbo frames on these controllers,
    make controller drop frame that is longer than RE_RX_DESC_BUFLEN
    sized frame. Fortunately RTL810x controllers, which do not support
    jumbo frame, have no such issues but this change also limited
    maximum RX buffer size allowed to RTL810x controllers. Allowing
    16KB RX buffer for controllers that have no such capability is

Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/re/if_re.c
--- stable/8/sys/dev/re/if_re.c	Sat Jan 15 00:23:57 2011	(r217434)
+++ stable/8/sys/dev/re/if_re.c	Sat Jan 15 00:32:15 2011	(r217435)
@@ -2779,8 +2779,13 @@ re_init_locked(struct rl_softc *sc)
 	 * For 8169 gigE NICs, set the max allowed RX packet
 	 * size so we can receive jumbo frames.
-	if (sc->rl_type == RL_8169)
-		CSR_WRITE_2(sc, RL_MAXRXPKTLEN, 16383);
+	if (sc->rl_type == RL_8169) {
+		if ((sc->rl_flags & (RL_FLAG_PCIE | RL_FLAG_NOJUMBO)) ==
+		else
+			CSR_WRITE_2(sc, RL_MAXRXPKTLEN, 16383);
+	}
 	if (sc->rl_testmode)

More information about the svn-src-stable-8 mailing list