Module Name: src Committed By: isaki Date: Sat Feb 6 12:53:37 UTC 2021
Modified Files: src/sys/arch/arm/xscale: pxa2x0_ac97.c Log Message: Fix "locking against myself". halt_{input,output} will be called with sc_intr_lock held. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/xscale/pxa2x0_ac97.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/arch/arm/xscale/pxa2x0_ac97.c diff -u src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.19 src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.20 --- src/sys/arch/arm/xscale/pxa2x0_ac97.c:1.19 Sat Feb 6 07:16:54 2021 +++ src/sys/arch/arm/xscale/pxa2x0_ac97.c Sat Feb 6 12:53:36 2021 @@ -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 @@ acu_halt_output(void *arg) { 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 @@ acu_halt_input(void *arg) { 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); }