Date: Tue, 05 Sep 2006 13:02:47 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: phk@phk.freebsd.dk Cc: freebsd-current@freebsd.org, freebsd-drivers@freebsd.org, freebsd-arch@freebsd.org Subject: Re: bus_get_dma_tag now necessary for drivers using bus_dma Message-ID: <20060905.130247.-267228160.imp@bsdimp.com> In-Reply-To: <14026.1157478288@critter.freebsd.dk> References: <20060905173334.GH9421@funkthat.com> <14026.1157478288@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <14026.1157478288@critter.freebsd.dk> "Poul-Henning Kamp" <phk@phk.freebsd.dk> writes: : In message <20060905173334.GH9421@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 ? As Scott pointed out, it won't always be NULL. I like his idea of having a variant that takes a device_t... Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060905.130247.-267228160.imp>