summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
authorcg <cg@FreeBSD.org>2000-05-31 19:04:12 +0000
committercg <cg@FreeBSD.org>2000-05-31 19:04:12 +0000
commit31a7173f2ee9c4f81876fe09f0147a92c0f90219 (patch)
tree2b564fefcc237033291c9451d006a01bb2ebb47f /sys/dev/sound
parentcde7d8a67d42b83dc579b6a3c6b1dfe5fb1815a8 (diff)
downloadFreeBSD-src-31a7173f2ee9c4f81876fe09f0147a92c0f90219.zip
FreeBSD-src-31a7173f2ee9c4f81876fe09f0147a92c0f90219.tar.gz
add a bit more diagnostic info for the bus_dmamap_load failure case
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/pci/ds1.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c
index d5663f6..7445209 100644
--- a/sys/dev/sound/pci/ds1.c
+++ b/sys/dev/sound/pci/ds1.c
@@ -567,8 +567,9 @@ ds_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error)
sc->ctrlbase = error? 0 : (u_int32_t)segs->ds_addr;
if (bootverbose) {
- printf("ds1: setmap %lx, %lx; ", (unsigned long)segs->ds_addr,
- (unsigned long)segs->ds_len);
+ printf("ds1: setmap (%lx, %lx), nseg=%d, error=%d\n",
+ (unsigned long)segs->ds_addr, (unsigned long)segs->ds_len,
+ nseg, error);
}
}
@@ -613,10 +614,12 @@ ds_init(struct sc_info *sc)
if (bus_dmamem_alloc(sc->parent_dmat, &buf, BUS_DMA_NOWAIT, &map))
return -1;
- if (bus_dmamap_load(sc->parent_dmat, map, buf, memsz, ds_setmap, sc, 0))
- return -1;
- if (!sc->ctrlbase)
+ if (bus_dmamap_load(sc->parent_dmat, map, buf, memsz, ds_setmap, sc, 0)
+ || !sc->ctrlbase) {
+ device_printf(sc->dev, "pcs=%d, rcs=%d, ecs=%d, ws=%d, memsz=%d\n",
+ pcs, rcs, ecs, ws, memsz);
return -1;
+ }
cb = 0;
t = buf;
OpenPOWER on IntegriCloud