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 return value of interrupt handler, pointed o...
details: https://anonhg.NetBSD.org/src/rev/777e7749bd08
branches: trunk
changeset: 989921:777e7749bd08
user: knakahara <knakahara%NetBSD.org@localhost>
date: Wed Oct 20 07:04:28 2021 +0000
description:
Fix return value of interrupt handler, pointed out by msaitoh@n.o.
Even if stopping flag is set (and handler do nothing), the interrupt
itself should be assume to be processed when ICR is not zero. If not,
interrupt count is not incremented correctly.
diffstat:
sys/dev/pci/if_wm.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (63 lines):
diff -r ae2782d444d9 -r 777e7749bd08 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Wed Oct 20 05:41:57 2021 +0000
+++ b/sys/dev/pci/if_wm.c Wed Oct 20 07:04:28 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.711 2021/10/20 02:12:36 knakahara Exp $ */
+/* $NetBSD: if_wm.c,v 1.712 2021/10/20 07:04:28 knakahara Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.711 2021/10/20 02:12:36 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.712 2021/10/20 07:04:28 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -9853,7 +9853,7 @@
if (rxq->rxq_stopping) {
mutex_exit(rxq->rxq_lock);
- return 0;
+ return 1;
}
#if defined(WM_DEBUG) || defined(WM_EVENT_COUNTERS)
@@ -9877,7 +9877,7 @@
if (txq->txq_stopping) {
mutex_exit(txq->txq_lock);
- return 0;
+ return 1;
}
#if defined(WM_DEBUG) || defined(WM_EVENT_COUNTERS)
@@ -9897,7 +9897,7 @@
if (sc->sc_core_stopping) {
WM_CORE_UNLOCK(sc);
- return 0;
+ return 1;
}
if (icr & (ICR_LSC | ICR_RXSEQ)) {
@@ -9997,7 +9997,7 @@
if (txq->txq_stopping) {
mutex_exit(txq->txq_lock);
- return 0;
+ return 1;
}
WM_Q_EVCNT_INCR(txq, txdw);
@@ -10011,7 +10011,7 @@
if (rxq->rxq_stopping) {
mutex_exit(rxq->rxq_lock);
- return 0;
+ return 1;
}
WM_Q_EVCNT_INCR(rxq, intr);
Home |
Main Index |
Thread Index |
Old Index