Subject: Re: ISA bounce buffer/DMA interface
To: Chris G Demetriou <Chris_G_Demetriou@balvenie.pdl.cs.cmu.edu>
From: Matt Thomas <matt@lkg.dec.com>
List: tech-kern
Date: 09/15/1995 18:50:43
Myself, I'd rather have something:
db = dma_alloc(bus_pointer); /* ISA, PCI, QBUS,
EISA, SBUS, TC, whatever */
/*
* this needs to be a loop in case we cross a page boundary.
*/
do {
if (!dma_map(db, &va1, &length1, &bus_addr))
goto cleanup;
/* use value of bus_addr; va1 & length1 have been modified
* to either NULL & 0 or the amount in the next page */
} while (va1 != NULL);
/*
* do it for next virtually discontigous chunk
*/
/* do the dma op */
dma_start(db); /* for ISA */
/* much later after dma op has finish */
dma_free(db); /* free resources */
ideally, bus_pointer should be the (devirable from) parent pointer from
your probe call since that should be pointing to the instance of the bus.
Matt Thomas Internet: matt@lkg.dec.com
3am Software Foundry WWW URL: <currently homeless>
Westford, MA Disclaimer: Digital disavows all knowledge
of this message