Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci msk(4): simplify interrupt return value creation
details: https://anonhg.NetBSD.org/src/rev/64b422cb2362
branches: trunk
changeset: 932586:64b422cb2362
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon May 11 19:17:46 2020 +0000
description:
msk(4): simplify interrupt return value creation
This also corrects a problem where we would not claim we handled an
interrupt that was ours.
diffstat:
sys/dev/pci/if_msk.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 85ce67e15863 -r 64b422cb2362 sys/dev/pci/if_msk.c
--- a/sys/dev/pci/if_msk.c Mon May 11 18:49:04 2020 +0000
+++ b/sys/dev/pci/if_msk.c Mon May 11 19:17:46 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.111 2020/05/11 18:49:04 jakllsch Exp $ */
+/* $NetBSD: if_msk.c,v 1.112 2020/05/11 19:17:46 jakllsch Exp $ */
/* $OpenBSD: if_msk.c,v 1.79 2009/10/15 17:54:56 deraadt Exp $ */
/*
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.111 2020/05/11 18:49:04 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.112 2020/05/11 19:17:46 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2275,7 +2275,6 @@
struct sk_if_softc *sc_if0 = sc->sk_if[SK_PORT_A];
struct sk_if_softc *sc_if1 = sc->sk_if[SK_PORT_B];
struct ifnet *ifp0 = NULL, *ifp1 = NULL;
- int claimed = 0;
uint32_t status;
struct msk_status_desc *cur_st;
@@ -2339,7 +2338,6 @@
if (status & SK_Y2_IMR_BMU) {
CSR_WRITE_4(sc, SK_STAT_BMU_CSR, SK_STAT_BMU_IRQ_CLEAR);
- claimed = 1;
}
CSR_WRITE_4(sc, SK_Y2_ICR, 2);
@@ -2355,7 +2353,7 @@
if (sc->sk_int_mod_pending)
msk_update_int_mod(sc, 1);
- return claimed;
+ return (status & sc->sk_intrmask) != 0;
}
static void
Home |
Main Index |
Thread Index |
Old Index