Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/xscale Fix "locking against myself".



details:   https://anonhg.NetBSD.org/src/rev/b9547046828c
branches:  trunk
changeset: 959259:b9547046828c
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Feb 06 12:53:36 2021 +0000

description:
Fix "locking against myself".
halt_{input,output} will be called with sc_intr_lock held.

diffstat:

 sys/arch/arm/xscale/pxa2x0_ac97.c |  6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r f11ecd659907 -r b9547046828c sys/arch/arm/xscale/pxa2x0_ac97.c
--- a/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Feb 06 12:50:04 2021 +0000
+++ b/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Feb 06 12:53:36 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pxa2x0_ac97.c,v 1.19 2021/02/06 07:16:54 isaki Exp $   */
+/*     $NetBSD: pxa2x0_ac97.c,v 1.20 2021/02/06 12:53:36 isaki Exp $   */
 
 /*
  * Copyright (c) 2003, 2005 Wasabi Systems, Inc.
@@ -724,14 +724,12 @@
 {
        struct acu_softc *sc = arg;
 
-       mutex_spin_enter(&sc->sc_intr_lock);
        if (sc->sc_txdma) {
                acu_reg_write(sc, AC97_POCR, 0);
                acu_reg_write(sc, AC97_POSR, AC97_FIFOE);
                pxa2x0_dmac_abort_xfer(sc->sc_txdma->ad_dx);
                sc->sc_txdma = NULL;
        }
-       mutex_spin_exit(&sc->sc_intr_lock);
        return (0);
 }
 
@@ -740,14 +738,12 @@
 {
        struct acu_softc *sc = arg;
 
-       mutex_spin_enter(&sc->sc_intr_lock);
        if (sc->sc_rxdma) {
                acu_reg_write(sc, AC97_PICR, 0);
                acu_reg_write(sc, AC97_PISR, AC97_FIFOE);
                pxa2x0_dmac_abort_xfer(sc->sc_rxdma->ad_dx);
                sc->sc_rxdma = NULL;
        }
-       mutex_spin_exit(&sc->sc_intr_lock);
        return (0);
 }
 



Home | Main Index | Thread Index | Old Index