Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Patch from http://mail-index.netbsd.org/current-...



details:   https://anonhg.NetBSD.org/src/rev/b3b2502e3e63
branches:  trunk
changeset: 553891:b3b2502e3e63
user:      manu <manu%NetBSD.org@localhost>
date:      Wed Oct 22 15:57:33 2003 +0000

description:
Patch from http://mail-index.netbsd.org/current-users/2003/09/04/0018.html
to fix problems with a sound card

diffstat:

 sys/dev/pci/auich.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r 63623d7dd525 -r b3b2502e3e63 sys/dev/pci/auich.c
--- a/sys/dev/pci/auich.c       Wed Oct 22 15:51:18 2003 +0000
+++ b/sys/dev/pci/auich.c       Wed Oct 22 15:57:33 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auich.c,v 1.44 2003/10/22 11:32:12 fvdl Exp $  */
+/*     $NetBSD: auich.c,v 1.45 2003/10/22 15:57:33 manu Exp $  */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -115,7 +115,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.44 2003/10/22 11:32:12 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.45 2003/10/22 15:57:33 manu Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -489,7 +489,9 @@
        /* Reset codec and AC'97 */
        auich_reset_codec(sc);
        status = bus_space_read_4(sc->iot, sc->aud_ioh, ICH_GSTS);
-       if (!(status & ICH_PCR)) { /* reset failure */
+
+       /* Reset failure */
+       if (!sc->sc_ignore_codecready && !(status & ICH_PCR)) { 
                        /* It never return ICH_PCR in some cases */
                if (d->quirks & QUIRK_IGNORE_CODEC_READY_MAYBE) {
                        sc->sc_ignore_codecready = TRUE;
@@ -613,8 +615,9 @@
        for (i = 500000; i-- &&
               !(bus_space_read_4(sc->iot, sc->aud_ioh, ICH_GSTS) & ICH_PCR);
             DELAY(1));                                 /*       or ICH_SCR? */
-       if (i <= 0)
-               printf("%s: auich_reset_codec: time out\n", sc->sc_dev.dv_xname);
+       if (!sc->sc_ignore_codecready && (i <= 0))
+               printf("%s: auich_reset_codec: time out\n", 
+                   sc->sc_dev.dv_xname);
 }
 
 int



Home | Main Index | Thread Index | Old Index