Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Don't try to handle interrupts for a detached de...
details: https://anonhg.NetBSD.org/src/rev/415c81e67bf1
branches: trunk
changeset: 446502:415c81e67bf1
user: bouyer <bouyer%NetBSD.org@localhost>
date: Sat Dec 08 13:31:31 2018 +0000
description:
Don't try to handle interrupts for a detached device. Should fix
panic on shutdown reported by Stefan Hertenberger on current-users.
diffstat:
sys/dev/pci/if_msk.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (44 lines):
diff -r f56039f95d7c -r 415c81e67bf1 sys/dev/pci/if_msk.c
--- a/sys/dev/pci/if_msk.c Sat Dec 08 12:18:37 2018 +0000
+++ b/sys/dev/pci/if_msk.c Sat Dec 08 13:31:31 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.80 2018/11/13 19:39:04 jdolecek Exp $ */
+/* $NetBSD: if_msk.c,v 1.81 2018/12/08 13:31:31 bouyer 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.80 2018/11/13 19:39:04 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.81 2018/12/08 13:31:31 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1299,7 +1299,7 @@
if (sc->sk_if[sc_if->sk_port] == NULL)
return (0);
- msk_stop(ifp, 0);
+ msk_stop(ifp, 1);
if (--sc->rnd_attached == 0)
rnd_detach_source(&sc->rnd_source);
@@ -2244,10 +2244,12 @@
switch (cur_st->sk_opcode) {
case SK_Y2_STOPC_RXSTAT:
sc_if = sc->sk_if[cur_st->sk_link & 0x01];
- msk_rxeof(sc_if, letoh16(cur_st->sk_len),
- letoh32(cur_st->sk_status));
- if (sc_if->sk_cdata.sk_rx_cnt < (MSK_RX_RING_CNT/3))
- msk_fill_rx_tick(sc_if);
+ if (sc_if) {
+ msk_rxeof(sc_if, letoh16(cur_st->sk_len),
+ letoh32(cur_st->sk_status));
+ if (sc_if->sk_cdata.sk_rx_cnt < (MSK_RX_RING_CNT/3))
+ msk_fill_rx_tick(sc_if);
+ }
break;
case SK_Y2_STOPC_TXSTAT:
if (sc_if0)
Home |
Main Index |
Thread Index |
Old Index