diff options
author | yongari <yongari@FreeBSD.org> | 2006-08-22 02:32:48 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2006-08-22 02:32:48 +0000 |
commit | f39fbdd70545e5a375029d7c59616b06ef675023 (patch) | |
tree | b0f3b04383680160c0f347c48594bca39f32bc1a /sys | |
parent | 8e50b5d93c6a16a583336fb64d6f603473fdafff (diff) | |
download | FreeBSD-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.c | 12 |
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"); |