Subject: Re: struct buf trouble...
To: Chuck Silvers <chuq@chuq.com>
From: Anders Magnusson <ragge@ludd.luth.se>
List: tech-kern
Date: 06/05/2001 09:20:36
> hi ragge,
> 
> there's no special reason why b_proc isn't initialized,
> I just didn't realize that anything would be looking at it.
> what do you use it for?
> 
It was used like this:

        err = bus_dmamap_load(sc->sc_dmat, mxi->mxi_dmam, bp->b_data,
            bp->b_bcount, bp->b_proc, BUS_DMA_NOWAIT);

which gave quite bad results. But it's no problem to do something like:

        err = bus_dmamap_load(sc->sc_dmat, mxi->mxi_dmam, bp->b_data,
            bp->b_bcount, (bp->b_flags & B_PHYS ? bp->b_proc : 0),
            BUS_DMA_NOWAIT);

instead, as long as the "syntax" of b_proc is known...

-- Ragge