Module Name:    src
Committed By:   nat
Date:           Wed Nov 15 01:45:57 UTC 2017

Modified Files:
        src/sys/dev: audio.c

Log Message:
Don't return EIO falsely when dealing with the hardware vc.
Draining of the hardware vc on close is now possible.


To generate a diff of this commit:
cvs rdiff -u -r1.431 -r1.432 src/sys/dev/audio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/audio.c
diff -u src/sys/dev/audio.c:1.431 src/sys/dev/audio.c:1.432
--- src/sys/dev/audio.c:1.431	Tue Nov  7 09:26:55 2017
+++ src/sys/dev/audio.c	Wed Nov 15 01:45:57 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.431 2017/11/07 09:26:55 nat Exp $	*/
+/*	$NetBSD: audio.c,v 1.432 2017/11/15 01:45:57 nat Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.431 2017/11/07 09:26:55 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.432 2017/11/15 01:45:57 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -1605,7 +1605,7 @@ audio_waitio(struct audio_softc *sc, kco
 	/* Wait for pending I/O to complete. */
 	error = cv_wait_sig(chan, sc->sc_lock);
 
-	if (!sc->sc_usemixer)
+	if (!sc->sc_usemixer || vc == sc->sc_hwvc)
 		return error;
 
 	found = false;

Reply via email to