Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci need to hold thread lock when using AC97_IS_* ma...
details: https://anonhg.NetBSD.org/src/rev/083f0d641984
branches: trunk
changeset: 771567:083f0d641984
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Nov 25 12:31:55 2011 +0000
description:
need to hold thread lock when using AC97_IS_* macros
diffstat:
sys/dev/pci/gcscaudio.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r c8f468cc7d38 -r 083f0d641984 sys/dev/pci/gcscaudio.c
--- a/sys/dev/pci/gcscaudio.c Fri Nov 25 11:19:10 2011 +0000
+++ b/sys/dev/pci/gcscaudio.c Fri Nov 25 12:31:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gcscaudio.c,v 1.9 2011/11/24 03:35:59 mrg Exp $ */
+/* $NetBSD: gcscaudio.c,v 1.10 2011/11/25 12:31:55 jmcneill Exp $ */
/*-
* Copyright (c) 2008 SHIMIZU Ryo <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gcscaudio.c,v 1.9 2011/11/24 03:35:59 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gcscaudio.c,v 1.10 2011/11/25 12:31:55 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -328,6 +328,8 @@
sc->sc_nformats = 0;
gcscaudio_append_formats(sc, &gcscaudio_formats_2ch);
+
+ mutex_enter(&sc->sc_lock);
if (AC97_IS_4CH(sc->codec_if))
gcscaudio_append_formats(sc, &gcscaudio_formats_4ch);
if (AC97_IS_6CH(sc->codec_if))
@@ -338,6 +340,7 @@
sc->sc_formats[i].frequency[0] = 48000;
}
}
+ mutex_exit(&sc->sc_lock);
if ((rc = auconv_create_encodings(sc->sc_formats, sc->sc_nformats,
&sc->sc_encodings)) != 0) {
Home |
Main Index |
Thread Index |
Old Index