Re: bus_get_dma_tag now necessary for drivers using bus_dma



Poul-Henning Kamp wrote:
In message <20060905173334.GH9421@xxxxxxxxxxxx>, 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
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: bus_get_dma_tag now necessary for drivers using bus_dma
    ... Poul-Henning Kamp wrote: ... a NULL pointer, you should call bus_get_dma_tagand use that ... as the parent tag. ... I committed some example code to various drivers, ...
    (freebsd-current)
  • Re: bus_get_dma_tag now necessary for drivers using bus_dma
    ... a NULL pointer, you should call bus_get_dma_tagand use that ... as the parent tag. ... Drivers can have their own multi-level tag heirarchy. ... For example I use the following prototype on NetBSD and FreeBSD: ...
    (freebsd-arch)
  • Re: bus_get_dma_tag now necessary for drivers using bus_dma
    ... a NULL pointer, you should call bus_get_dma_tagand use that ... as the parent tag. ... Drivers can have their own multi-level tag heirarchy. ... For example I use the following prototype on NetBSD and FreeBSD: ...
    (freebsd-current)
  • Being more anal about iospace accesses..
    ... (MMIO), mainly because on a PC ... pointer directly, and it will actually work on most machines. ... result some drivers didn't use a pointer at all, ... Sometimes such a "mixed interface" driver does it based on a compile ...
    (Linux-Kernel)
  • Re: ANNOYING AT ITS BEST - also posted in games section
    ... them involving games that take up the whole screen, and need a few sec. to minimize ad maximize them. ... Also look at the computer manufacturer site and the graphics card manufacturer site for different drivers. ... lower graphics hardware acceleration in Display Properties, Settings tab, Advanced button, Troubleshooting tab. ... If I put my mouse cursor over it, it blinks continuously, switching from saying "Enter your message" with the type symbol pointer, to my regular, white mouse pointer. ...
    (microsoft.public.windowsxp.help_and_support)