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]
This commit is contained in:
Gleb Smirnoff 2006-02-09 12:57:17 +00:00
parent a47c388cce
commit 4f4a363562

View file

@ -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;