summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2006-08-22 02:32:48 +0000
committeryongari <yongari@FreeBSD.org>2006-08-22 02:32:48 +0000
commitf39fbdd70545e5a375029d7c59616b06ef675023 (patch)
treeb0f3b04383680160c0f347c48594bca39f32bc1a /sys
parent8e50b5d93c6a16a583336fb64d6f603473fdafff (diff)
downloadFreeBSD-src-f39fbdd70545e5a375029d7c59616b06ef675023.zip
FreeBSD-src-f39fbdd70545e5a375029d7c59616b06ef675023.tar.gz
It seems that em(4) misses Tx completion interrupts under certain
conditions. The cause of missing Tx completion interrupts comes from Tx interrupt moderation mechanism(delayed interrupts) or chipset bug. If Tx interrupt moderation mechanism is the cause of false watchdog timeout error we should have to fix all device drivers that have Tx interrupt moderation capability. We may need more investigation for this issue. Anyway, the fix is the same for both cases. This should fix occasional watchdog timeout errors seen on a few systems. Reported by: -net, Patrick M. Hausen < hausen AT punkt DOT de > Tested by: Patrick M. Hausen < hausen AT punkt DOT de >
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/em/if_em.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 340520a..400d0e3 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -946,6 +946,18 @@ em_watchdog(struct ifnet *ifp)
return;
}
+ /*
+ * Reclaim first as there is a possibility of losing Tx completion
+ * interrupts. Possible cause of missing Tx completion interrupts
+ * comes from Tx interrupt moderation mechanism(delayed interrupts)
+ * or chipset bug.
+ */
+ em_txeof(adapter);
+ if (adapter->num_tx_desc_avail == adapter->num_tx_desc) {
+ EM_UNLOCK(adapter);
+ return;
+ }
+
if (em_check_for_link(&adapter->hw) == 0)
device_printf(adapter->dev, "watchdog timeout -- resetting\n");
OpenPOWER on IntegriCloud