Subject: Re: bus_dmamem_alloc()
To: None <p99dreyf@criens.u-psud.fr>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-kern
Date: 04/08/2001 17:55:33
In <1erjk45.1sgo5gd194095sM@[10.0.12.137]>
p99dreyf@criens.u-psud.fr wrote:

> The following crashes my machine in bus_dmamem_alloc(). Anyone has an
> idea why?

> bus_dma_segment_t *cmem_segs;
 :
>        cmem_dma_tag = softc->sc_dmat;
> 
>        res = bus_dmamem_alloc (cmem_dma_tag, CMEM_ALLOC_SIZE, 0, 0, 
>             cmem_segs, 1, &rsegs, BUS_DMA_NOWAIT);

Looks cmem_segs is not initialized. How about:

	bus_dma_segment_t cmem_segs;
 :
	res = bus_dmamem_alloc (cmem_dma_tag, CMEM_ALLOC_SIZE, 0, 0, 
	    &cmem_segs, 1, &rsegs, BUS_DMA_NOWAIT);
 :
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp