summaryrefslogtreecommitdiffstats
path: root/sys/dev/re
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2009-02-09 04:59:13 +0000
committeryongari <yongari@FreeBSD.org>2009-02-09 04:59:13 +0000
commit001e930ccf60025a7bcd992f1c65544b6326cc9d (patch)
treea2c2bed22f4b925d9e9f1ddd8980d5bd44492614 /sys/dev/re
parent1d3100332227627bed39b885163be6c8f33cdae8 (diff)
downloadFreeBSD-src-001e930ccf60025a7bcd992f1c65544b6326cc9d.zip
FreeBSD-src-001e930ccf60025a7bcd992f1c65544b6326cc9d.tar.gz
Reclaim transmitted frames in re_tick(). This is for PCIe
controllers that lose Tx completion interrupts under certain conditions. With this change it's safe to use MSI on PCIe controllers so enable MSI on these controllers.
Diffstat (limited to 'sys/dev/re')
-rw-r--r--sys/dev/re/if_re.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 69fda14..eb48c89 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -156,7 +156,7 @@ MODULE_DEPEND(re, miibus, 1, 1, 1);
#include "miibus_if.h"
/* Tunables. */
-static int msi_disable = 1;
+static int msi_disable = 0;
TUNABLE_INT("hw.re.msi_disable", &msi_disable);
#define RE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP)
@@ -2064,6 +2064,13 @@ re_tick(void *xsc)
mii_tick(mii);
if ((sc->rl_flags & RL_FLAG_LINK) == 0)
re_miibus_statchg(sc->rl_dev);
+ /*
+ * Reclaim transmitted frames here. Technically it is not
+ * necessary to do here but it ensures periodic reclamation
+ * regardless of Tx completion interrupt which seems to be
+ * lost on PCIe based controllers under certain situations.
+ */
+ re_txeof(sc);
re_watchdog(sc);
callout_reset(&sc->rl_stat_callout, hz, re_tick, sc);
}
OpenPOWER on IntegriCloud