看板 DFBSD_kernel 關於我們 聯絡資訊
On Fri, Nov 12, 2004 at 10:54:25AM +0100, Joerg Sonnenberger wrote: > On Wed, Nov 10, 2004 at 02:20:08PM -0800, Chuck Tuffli wrote: > > bus_dma_tag_parent(dev) > > > > Returns the DMA tag of the bus dev connects to. Drivers can use the > > DMA tag for the parent parameter in subsequent calls to > > bus_dma_tag_create(9). All devices on a bus share this tag as their > > parent and should not destroy it. > > > > Returns NULL if tag does not exist or a bus_dma_tag_t on success. > > I still think having an option to specify the number of maximum number of > segments would be useful. This is not a problem here, because e.g. for > PCI it can be ignored or used as INVARIANT. > > I also think we want to have the address constraints in the parent tag. > > Joerg The intent is that drivers use this tag for parent instead of creating their own parent tag by doing something like bus_dma_tag_create(NULL, ..., &parent_dmat); bus_dma_tag_create(parent_dmat, ..., &mybuffer_dmat); This should allow the bus driver to specify the address constraints as well as the number of segments and allow device drivers to inherit sane parameters for their calls to bus_dma_tag_create(). The current sequence of events looks something like bus_dma_tag_create(NULL, ..., &parent_dmat); bus_dma_tag_create(parent_dmat, ..., &mybuffer_dmat); while the proposal would look like parent_dmat = bus_dma_tag_parent(dev); bus_dma_tag_create(parent_dmat, ..., &mybuffer_dmat); What kind of situations would specifying the max number of segments be useful? -- Chuck Tuffli Agilent Technologies