Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/jmcneill-audiomp3]: src/sys/dev/pci/hdaudio need to hold intr_lock while...
details: https://anonhg.NetBSD.org/src/rev/dc4f6e4e6186
branches: jmcneill-audiomp3
changeset: 771337:dc4f6e4e6186
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Nov 20 11:09:25 2011 +0000
description:
need to hold intr_lock while calling audio_pint/audio_rint
diffstat:
sys/dev/pci/hdaudio/hdafg.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diffs (44 lines):
diff -r bdefb0570c5f -r dc4f6e4e6186 sys/dev/pci/hdaudio/hdafg.c
--- a/sys/dev/pci/hdaudio/hdafg.c Sun Nov 20 10:58:10 2011 +0000
+++ b/sys/dev/pci/hdaudio/hdafg.c Sun Nov 20 11:09:25 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.10.4.1 2011/11/19 23:40:07 jmcneill Exp $ */
+/* $NetBSD: hdafg.c,v 1.10.4.2 2011/11/20 11:09:25 jmcneill Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <support%precedence.co.uk@localhost>
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.10.4.1 2011/11/19 23:40:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.10.4.2 2011/11/20 11:09:25 jmcneill Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -3166,15 +3166,16 @@
hda_write1(ad->ad_sc->sc_host, HDAUDIO_SD_STS(st->st_shift),
HDAUDIO_STS_DESE | HDAUDIO_STS_FIFOE | HDAUDIO_STS_BCIS);
- //if (sts & HDAUDIO_STS_BCIS) {
- if (st == ad->ad_playback && ad->ad_playbackintr) {
- ad->ad_playbackintr(ad->ad_playbackintrarg);
- handled = 1;
- } else if (st == ad->ad_capture && ad->ad_captureintr) {
- ad->ad_captureintr(ad->ad_captureintrarg);
- handled = 1;
- }
- //}
+ mutex_spin_enter(&ad->ad_sc->sc_intr_lock);
+ /* XXX test (sts & HDAUDIO_STS_BCIS)? */
+ if (st == ad->ad_playback && ad->ad_playbackintr) {
+ ad->ad_playbackintr(ad->ad_playbackintrarg);
+ handled = 1;
+ } else if (st == ad->ad_capture && ad->ad_captureintr) {
+ ad->ad_captureintr(ad->ad_captureintrarg);
+ handled = 1;
+ }
+ mutex_spin_exit(&ad->ad_sc->sc_intr_lock);
return handled;
}
Home |
Main Index |
Thread Index |
Old Index