bus_get_dma_tag now necessary for drivers using bus_dma
Scott Long
scottl at samsco.org
Tue Sep 5 18:31:37 UTC 2006
Poul-Henning Kamp wrote:
> In message <20060905173334.GH9421 at funkthat.com>, John-Mark Gurney writes:
>
>
>>This means that for each call to bus_dma_tag_create, instead of passing
>>a NULL pointer, you should call bus_get_dma_tag(yourdev) and use that
>>as the parent tag. I committed some example code to various drivers,
>>such as ahc, ata, em, and ohci.
>
>
> If there are never any exeptions to this requirement, why not
> pass "yourdev" and have the magic hidden, rather than add 17
> ritual characters to the API ?
>
Drivers can have their own multi-level tag heirarchy. You'd have to
create a new bus_dma_tag_create() variant that expected a device_t
instead of a bus_dma_tag_t. This might be a good idea.
Scott
More information about the freebsd-arch
mailing list