Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sbus fix a bug introduced in rev 1.19:
details: https://anonhg.NetBSD.org/src/rev/b47e973a8302
branches: trunk
changeset: 534096:b47e973a8302
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Jul 16 11:48:45 2002 +0000
description:
fix a bug introduced in rev 1.19:
- finish bus_space-ification of cs4231_sbus_trigger_input().
this stops recording on the sbus cs4231 from crashing.
diffstat:
sys/dev/sbus/cs4231_sbus.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diffs (52 lines):
diff -r d1527bf26af5 -r b47e973a8302 sys/dev/sbus/cs4231_sbus.c
--- a/sys/dev/sbus/cs4231_sbus.c Tue Jul 16 10:12:28 2002 +0000
+++ b/sys/dev/sbus/cs4231_sbus.c Tue Jul 16 11:48:45 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cs4231_sbus.c,v 1.20 2002/03/27 16:03:52 pk Exp $ */
+/* $NetBSD: cs4231_sbus.c,v 1.21 2002/07/16 11:48:45 mrg Exp $ */
/*-
* Copyright (c) 1998, 1999, 2002 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.20 2002/03/27 16:03:52 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs4231_sbus.c,v 1.21 2002/07/16 11:48:45 mrg Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -309,11 +309,11 @@
/* load next block if we can */
csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
if (csr & APC_PD) {
- cs4231_transfer_advance(t, &dmaaddr, &dmasize);
- bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnva, dmaaddr);
- bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnc, dmasize);
+ cs4231_transfer_advance(t, &dmaaddr, &dmasize);
+ bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnva, dmaaddr);
+ bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnc, dmasize);
- DPRINTF(("trigger_output: 2nd: %x %d, %x %d\n",
+ DPRINTF(("trigger_output: 2nd: %x %d, %x %d\n",
bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapva),
bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapc),
bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmapnva),
@@ -434,11 +434,12 @@
}
/* supply next block if we can */
- if (dma->dmacsr & APC_CD) {
- cs4231_transfer_advance(t, &dmaaddr, &dmasize);
- bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnva, dmaaddr);
- bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnc, dmasize);
- DPRINTF(("trigger_input: 2nd: %x %d, %x %d\n",
+ csr = bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacsr);
+ if (csr & APC_CD) {
+ cs4231_transfer_advance(t, &dmaaddr, &dmasize);
+ bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnva, dmaaddr);
+ bus_space_write_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnc, dmasize);
+ DPRINTF(("trigger_input: 2nd: %x %d, %x %d\n",
bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacva),
bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacc),
bus_space_read_4(sbsc->sc_bt, sbsc->sc_bh, (vaddr_t)&dma->dmacnva),
Home |
Main Index |
Thread Index |
Old Index