Subject: Re: Rev 1.19 of busdma.doc
To: None <matt@lkg.dec.com, thorpej@nas.nasa.gov>
From: Matthew Jacob <mjacob@feral.com>
List: tech-kern
Date: 11/11/1996 13:29:00
Status: R
>int bus_dmamap_load __P((bus_dma_tag_t tag, bus_dma_handle_t dmah,
> struct uio *uio, bus_dmamap_load_func_t func, void *funcarg,
> int flags));
What's a struct uio? :-) I deal with mbufs.
The present definition is much too "heavy" for use in network drivers.
I don't want to have to a bus_dmamap_create per s/g entry; instead I want
to do a single _create for the receive ring and a single _create for the
transmit ring. I then want the ability to _load and _unload sequences of
s/g entries as needed (the _create called will have pre-allocated the
resources needed to track the individual s/g resources). I would like
to envision one load/unload per packet.
I don't want to have to do multiple _creates. If I do, I'll to manage
the allocation of my own s/g entries. That seems like something that
_load/_unload should be able to do for me.
Otherwise I guess I'll just create N each of which can have two segments.
Since none of the devices I deal with can send more than the amount on
two pages, this means I'll have to do 1 load/unload per s/g entry.
I'd like two functions:
int bus_dmamap_load_segments __P((bus_dma_tag_t tag, bus_dma_handle_t dmah,
int startsegment, struct mbuf *mbuf, bus_dmamap_load_func_t func,
void *funcarg, int flags));
void bus_dmamap_unload_segments __P((bus_dma_tag_t tag,
bus_dma_handle_t dmah, int startsegment, size_t nsegments));
It's assumed that the load_func will track the segments used so there's no
need to return that.
--
Matt Thomas Internet: matt@3am-software.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt.html
Westford, MA Disclaimer: I disavow all knowledge of this message