Subject: Re: bus_dmamap_load: struct proc *p: finding process p
To: Sam Thigpen <sthigpen@sdf.lonestar.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 10/04/2004 02:01:30
On Mon, Oct 04, 2004 at 02:37:55AM +0000, Sam Thigpen wrote:
> old question:
>
> bus_dmamap_load __P((bus_dma_tag_t tag, bus_dma_handle_t dmah,
> caddr_t va, size_t size, struct proc *p, int flags));
> ^^^^^^^^^^^^^^
> Accepted way getting for getting struct proc *p?
>
> ath.c has :
>
> error = bus_dmamap_load(sc->sc_dmat, sc->sc_ddmamap,
> sc->sc_desc, sc->sc_desc_len,
> ath_load_cb, &sc->sc_desc_paddr,
> BUS_DMA_NOWAIT);
You're reading the wrong code. In the #ifdef __NetBSD__ portion, it says:
if ((error = bus_dmamap_load(sc->sc_dmat, sc->sc_ddmamap, sc->sc_desc,
sc->sc_desc_len, NULL, 0)) != 0) {
printf("%s: unable to load control data DMA map, error = %d\n",
sc->sc_dev.dv_xname, error);
goto fail3;
}
Dave
--
David Young OJC Technologies
dyoung@ojctech.com Urbana, IL * (217) 278-3933