diff options
author | glebius <glebius@FreeBSD.org> | 2006-02-09 12:57:17 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2006-02-09 12:57:17 +0000 |
commit | 1da629db3a429ed0923f6c1381130d7dffc0f3ac (patch) | |
tree | ae0f4ac4cd93d1d3e570bc59cd808bdff515fd13 /sys/dev/em | |
parent | 642125c1986a9ec4696a5164c810502588a9cec8 (diff) | |
download | FreeBSD-src-1da629db3a429ed0923f6c1381130d7dffc0f3ac.zip FreeBSD-src-1da629db3a429ed0923f6c1381130d7dffc0f3ac.tar.gz |
Fix two important typos in watchdog handling:
- Restart watchdog if we *did* processed any descriptors. [1]
- Log the watchdog event if the link is *up*. [2]
PR: kern/92948 [1]
Submitted by: Mihail Balikov <mihail.balikov interbgc.com> [1]
PR: kern/92895 [2]
Submitted by: Vladimir Ivanov <wawa yandex-team.ru> [2]
Diffstat (limited to 'sys/dev/em')
-rw-r--r-- | sys/dev/em/if_em.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index eef8a1f..2857d0e 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -887,7 +887,7 @@ em_watchdog(struct ifnet *ifp) return; } - if (em_check_for_link(&adapter->hw)) + if (!em_check_for_link(&adapter->hw)) printf("em%d: watchdog timeout -- resetting\n", adapter->unit); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; @@ -2745,7 +2745,7 @@ em_clean_transmit_interrupts(struct adapter * adapter) ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; if (num_avail == adapter->num_tx_desc) ifp->if_timer = 0; - else if (num_avail == adapter->num_tx_desc_avail) + else if (num_avail != adapter->num_tx_desc_avail) ifp->if_timer = EM_TX_TIMEOUT; } adapter->num_tx_desc_avail = num_avail; |