diff options
author | yongari <yongari@FreeBSD.org> | 2009-04-20 07:13:04 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2009-04-20 07:13:04 +0000 |
commit | 77dde87e614931b4a487e724c03c1187d87220af (patch) | |
tree | 86a9be2333612463f20d3fcff594f34cf3b29192 /sys/dev/re | |
parent | 53ec7b000ff939e8a5285b9ba3b09c75c87493a7 (diff) | |
download | FreeBSD-src-77dde87e614931b4a487e724c03c1187d87220af.zip FreeBSD-src-77dde87e614931b4a487e724c03c1187d87220af.tar.gz |
For RTL8139C+ controllers, have controller handle padding short
checksum offload frames. Software workaround used for broken
controllers(RTL8169, RTL8168, RTL8168B) seem to cause watchdog
timeouts on RTL8139C+.
Introduce a new flag RL_FLAG_AUTOPAD to mark automatic padding
feature of controller and set it for RTL8139C+ and controllers that
use new descriptor format. This fixes watchdog timeouts seen on
RTL8139C+.
Reported by: Dimitri Rodis < DimitriR <> integritasystems dot com >
Tested by: Dimitri Rodis < DimitriR <> integritasystems dot com >
Diffstat (limited to 'sys/dev/re')
-rw-r--r-- | sys/dev/re/if_re.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index fe7dad9..23abb46 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1250,7 +1250,8 @@ re_attach(device_t dev) switch (hw_rev->rl_rev) { case RL_HWREV_8139CPLUS: - sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_FASTETHER; + sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_FASTETHER | + RL_FLAG_AUTOPAD; break; case RL_HWREV_8100E: case RL_HWREV_8101E: @@ -1261,7 +1262,7 @@ re_attach(device_t dev) case RL_HWREV_8102EL: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | - RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP; + RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD; break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: @@ -1280,7 +1281,8 @@ re_attach(device_t dev) case RL_HWREV_8168CP: case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PAR | - RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP; + RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_CMDSTOP | + RL_FLAG_AUTOPAD; /* * These controllers support jumbo frame but it seems * that enabling it requires touching additional magic @@ -2250,7 +2252,7 @@ re_encap(struct rl_softc *sc, struct mbuf **m_head) * offload is enabled, we always manually pad short frames out * to the minimum ethernet frame size. */ - if ((sc->rl_flags & RL_FLAG_DESCV2) == 0 && + if ((sc->rl_flags & RL_FLAG_AUTOPAD) == 0 && (*m_head)->m_pkthdr.len < RL_IP4CSUMTX_PADLEN && ((*m_head)->m_pkthdr.csum_flags & CSUM_IP) != 0) { padlen = RL_MIN_FRAMELEN - (*m_head)->m_pkthdr.len; |