summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ixgb.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-06-08 16:54:35 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-06-08 16:54:35 +0000
commite8a79cb21277a1a4ca04f85800f4c8be52c2ccf4 (patch)
treecef7c07298459a33198e137bdafcaba6f2922089 /sys/dev/pci/if_ixgb.c
parent740b4269917fa4f714d266c1e4e6311575a9c9fa (diff)
Correct the watchdog timer by moving it out from under the condition check
for the IFF_OACTIVE flag. ok reyk@
Diffstat (limited to 'sys/dev/pci/if_ixgb.c')
-rw-r--r--sys/dev/pci/if_ixgb.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c
index d2d88e1ca71..41def4b1bda 100644
--- a/sys/dev/pci/if_ixgb.c
+++ b/sys/dev/pci/if_ixgb.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_ixgb.c,v 1.43 2008/06/08 16:53:23 brad Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.44 2008/06/08 16:54:34 brad Exp $ */
#include <dev/pci/if_ixgb.h>
@@ -1450,15 +1450,16 @@ ixgb_txeof(struct ixgb_softc *sc)
* clear the timeout. Otherwise, if some descriptors have been freed,
* restart the timeout.
*/
- if (num_avail > IXGB_TX_CLEANUP_THRESHOLD) {
+ if (num_avail > IXGB_TX_CLEANUP_THRESHOLD)
ifp->if_flags &= ~IFF_OACTIVE;
- /* All clean, turn off the timer */
- if (num_avail == sc->num_tx_desc)
- ifp->if_timer = 0;
- /* Some cleaned, reset the timer */
- else if (num_avail != sc->num_tx_desc_avail)
- ifp->if_timer = IXGB_TX_TIMEOUT;
- }
+
+ /* All clean, turn off the timer */
+ if (num_avail == sc->num_tx_desc)
+ ifp->if_timer = 0;
+ /* Some cleaned, reset the timer */
+ else if (num_avail != sc->num_tx_desc_avail)
+ ifp->if_timer = IXGB_TX_TIMEOUT;
+
sc->num_tx_desc_avail = num_avail;
}