From owner-freebsd-current@FreeBSD.ORG Tue Sep 5 17:44:56 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 4685D16A4E0; Tue, 5 Sep 2006 17:44:56 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE34043D5F; Tue, 5 Sep 2006 17:44:51 +0000 (GMT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 57B8B170C5; Tue, 5 Sep 2006 17:44:49 +0000 (UTC) To: John-Mark Gurney From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 05 Sep 2006 10:33:35 MST." <20060905173334.GH9421@funkthat.com> Date: Tue, 05 Sep 2006 17:44:48 +0000 Message-ID: <14026.1157478288@critter.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 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 17:44:56 -0000 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 ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.