Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Fix watchdog timer. Without this change, watchdo...



details:   https://anonhg.NetBSD.org/src/rev/ad4549556efe
branches:  trunk
changeset: 361261:ad4549556efe
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Fri Apr 20 03:03:13 2018 +0000

description:
Fix watchdog timer. Without this change, watchdog timer is unnecessary
fired and device is initialized without any error message. OK'd by knakahara.

diffstat:

 sys/dev/pci/if_wm.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r d9443036eede -r ad4549556efe sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Fri Apr 20 00:06:45 2018 +0000
+++ b/sys/dev/pci/if_wm.c       Fri Apr 20 03:03:13 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.573 2018/04/16 08:31:06 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.574 2018/04/20 03:03:13 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.573 2018/04/16 08:31:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.574 2018/04/20 03:03:13 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -3031,14 +3031,15 @@
         * before we report an error.
         */
        wm_txeof(txq, UINT_MAX);
-       if (txq->txq_watchdog)
-               *hang |= __BIT(wmq->wmq_id);
 
        if (txq->txq_free != WM_NTXDESC(txq)) {
 #ifdef WM_DEBUG
                int i, j;
                struct wm_txsoft *txs;
 #endif
+               if (txq->txq_watchdog)
+                       *hang |= __BIT(wmq->wmq_id);
+
                log(LOG_ERR,
                    "%s: device timeout (txfree %d txsfree %d txnext %d)\n",
                    device_xname(sc->sc_dev), txq->txq_free, txq->txq_sfree,



Home | Main Index | Thread Index | Old Index