From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 27 13:54:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E398516A41F; Thu, 27 Oct 2005 13:54:42 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4583A43D45; Thu, 27 Oct 2005 13:54:41 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.204] ([192.168.254.204]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id j9RDscsC072099; Thu, 27 Oct 2005 07:54:38 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4360DC20.90700@samsco.org> Date: Thu, 27 Oct 2005 07:54:40 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dinesh Nair References: <435E3003.4050609@alphaque.com> <200510251610.53127.jhb@freebsd.org> <435F1E77.30007@alphaque.com> <200510261320.16175.jhb@freebsd.org> <435FE416.1050703@samsco.org> <43606A0F.5000704@alphaque.com> In-Reply-To: <43606A0F.5000704@alphaque.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org Subject: Re: correct use of bus_dmamap_sync X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 13:54:43 -0000 Dinesh Nair wrote: > > On 10/27/05 04:16 Scott Long said the following: > >>>> an example would be using >>>> (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_PREWRITE) which >>>> would be 0x03 in freebsd 4.x and 0x06 in freebsd 5.x. the gotcha is >>>> that >>>> 0x03 in freebsd 4.x is BUS_DMASYNC_POSTWRITE. so therefore, >>>> BUS_DMASYNC_POSTREAD|BUS_DMASYNC_PREWRITE will be >>>> BUS_DMASYNC_POSTWRITE in >>>> 4.x which in the syscall is actually a no op. >>> >>> >>> Yes, that is fugly. Just don't use the | versions for now I would >>> guess. >> >> >> Trying to maintain source compatibility between 4.x and 5.x/6.x will >> make you encounter a whole lot more problems than just this. > > > could you elaborate on what busdma related problems there'd be, between > 4.x and 5.x/6.x ? do, for example, the inner workings of the bus_dma* > syscalls work the same on both ? > I was speaking about driver code in general. For busdma specifically, the only difference is the extra arguments to bus_dma_tag_create(). Scott