Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Fix two bugs:



details:   https://anonhg.NetBSD.org/src/rev/8b79f2331db9
branches:  trunk
changeset: 824530:8b79f2331db9
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Jun 08 10:40:13 2017 +0000

description:
Fix two bugs:
 - Inverted test for fifo status in aaci_write_data
 - Return success from trigger_output (thanks nat)

diffstat:

 sys/dev/ic/pl041.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r a0bccab9aa28 -r 8b79f2331db9 sys/dev/ic/pl041.c
--- a/sys/dev/ic/pl041.c        Thu Jun 08 10:05:32 2017 +0000
+++ b/sys/dev/ic/pl041.c        Thu Jun 08 10:40:13 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pl041.c,v 1.1 2017/06/08 10:02:39 jmcneill Exp $ */
+/* $NetBSD: pl041.c,v 1.2 2017/06/08 10:40:13 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pl041.c,v 1.1 2017/06/08 10:02:39 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pl041.c,v 1.2 2017/06/08 10:40:13 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -105,7 +105,7 @@
        if (sc->sc_pint == NULL)
                return;
 
-       while ((AACI_READ(sc, AACISR) & AACISR_TXHE) == 0) {
+       while ((AACI_READ(sc, AACISR) & AACISR_TXHE) != 0) {
                const int len = min(AACI_FIFO_DEPTH / 2, min(sc->sc_pblkresid,
                    (uintptr_t)sc->sc_pend - (uintptr_t)sc->sc_pcur));
                KASSERT((len & 3) == 0);
@@ -205,7 +205,7 @@
            AACITXCR_TXCM | AACITXCR_TSIZE_16 |
            AACITXCR_TX(3) | AACITXCR_TX(4));
 
-       return ENXIO;
+       return 0;
 }
 
 static int



Home | Main Index | Thread Index | Old Index