Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Hold sc_intr_lock in open()/close().
details: https://anonhg.NetBSD.org/src/rev/1b70d80ca537
branches: trunk
changeset: 1018511:1b70d80ca537
user: isaki <isaki%NetBSD.org@localhost>
date: Sat Feb 06 09:45:17 2021 +0000
description:
Hold sc_intr_lock in open()/close().
vtbl->{lock,unlock} (in fact ac97_{lock,unlock}) don't seem to need
releasing an interrupt lock.
Confirmed on auich.
diffstat:
sys/dev/pci/auich.c | 8 ++------
sys/dev/pci/auvia.c | 8 ++------
2 files changed, 4 insertions(+), 12 deletions(-)
diffs (76 lines):
diff -r f0c04f1187c3 -r 1b70d80ca537 sys/dev/pci/auich.c
--- a/sys/dev/pci/auich.c Sat Feb 06 09:27:35 2021 +0000
+++ b/sys/dev/pci/auich.c Sat Feb 06 09:45:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auich.c,v 1.159 2020/02/29 06:34:30 isaki Exp $ */
+/* $NetBSD: auich.c,v 1.160 2021/02/06 09:45:17 isaki Exp $ */
/*-
* Copyright (c) 2000, 2004, 2005, 2008 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.159 2020/02/29 06:34:30 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.160 2021/02/06 09:45:17 isaki Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -930,9 +930,7 @@
struct auich_softc *sc;
sc = (struct auich_softc *)addr;
- mutex_spin_exit(&sc->sc_intr_lock);
sc->codec_if->vtbl->lock(sc->codec_if);
- mutex_spin_enter(&sc->sc_intr_lock);
return 0;
}
@@ -942,9 +940,7 @@
struct auich_softc *sc;
sc = (struct auich_softc *)addr;
- mutex_spin_exit(&sc->sc_intr_lock);
sc->codec_if->vtbl->unlock(sc->codec_if);
- mutex_spin_enter(&sc->sc_intr_lock);
}
static int
diff -r f0c04f1187c3 -r 1b70d80ca537 sys/dev/pci/auvia.c
--- a/sys/dev/pci/auvia.c Sat Feb 06 09:27:35 2021 +0000
+++ b/sys/dev/pci/auvia.c Sat Feb 06 09:45:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auvia.c,v 1.86 2020/04/19 08:18:19 isaki Exp $ */
+/* $NetBSD: auvia.c,v 1.87 2021/02/06 09:45:17 isaki Exp $ */
/*-
* Copyright (c) 2000, 2008 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.86 2020/04/19 08:18:19 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auvia.c,v 1.87 2021/02/06 09:45:17 isaki Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -614,9 +614,7 @@
struct auvia_softc *sc;
sc = (struct auvia_softc *)addr;
- mutex_spin_exit(&sc->sc_intr_lock);
sc->codec_if->vtbl->lock(sc->codec_if);
- mutex_spin_enter(&sc->sc_intr_lock);
return 0;
}
@@ -626,9 +624,7 @@
struct auvia_softc *sc;
sc = (struct auvia_softc *)addr;
- mutex_spin_exit(&sc->sc_intr_lock);
sc->codec_if->vtbl->unlock(sc->codec_if);
- mutex_spin_enter(&sc->sc_intr_lock);
}
static int
Home |
Main Index |
Thread Index |
Old Index