From owner-freebsd-current@FreeBSD.ORG Tue Sep 5 19:09:14 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94E5216A501; Tue, 5 Sep 2006 19:09:14 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 542E943D53; Tue, 5 Sep 2006 19:04:27 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k85J2TUU014641; Tue, 5 Sep 2006 13:02:30 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 05 Sep 2006 13:02:47 -0600 (MDT) Message-Id: <20060905.130247.-267228160.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <14026.1157478288@critter.freebsd.dk> References: <20060905173334.GH9421@funkthat.com> <14026.1157478288@critter.freebsd.dk> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 05 Sep 2006 13:02:31 -0600 (MDT) Cc: gurney_j@resnet.uoregon.edu, 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 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 19:09:14 -0000 In message: <14026.1157478288@critter.freebsd.dk> "Poul-Henning Kamp" 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