From owner-freebsd-current@FreeBSD.ORG Tue Sep 26 23:17:20 2006 Return-Path: X-Original-To: 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 7547616A403 for ; Tue, 26 Sep 2006 23:17:20 +0000 (UTC) (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 11D7543D68 for ; Tue, 26 Sep 2006 23:17:17 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [10.10.3.185] ([165.236.175.187]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k8QNH9Vs015216; Tue, 26 Sep 2006 17:17:15 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4519B4EF.401@samsco.org> Date: Tue, 26 Sep 2006 17:17:03 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060206 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= References: <20060924151759.D788@antec.home> In-Reply-To: <20060924151759.D788@antec.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.0 required=3.8 tests=none autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: current@freebsd.org Subject: Re: i386/busmda_machdep.c 1.81 broke if_bfe 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, 26 Sep 2006 23:17:20 -0000 I just committed a fix for this. Thanks for bringing up the problem. Scott Mikko Työläjärvi wrote: > Hi, > > It seems to me that with version 1.81 of i386/busdma_machdep.c devices > that need bounce buffers, but do not use a filter function, will no > longer work. > > The run_filter() function contains the logic to detect if a bounce > buffer is needed also when there is no filter function, so I believe > it has to be called for devices that are marked as BUS_DMA_COULD_BOUNCE > as well as for those that provide a filter function. > > For example, this makes my bfe0 interface work again: > > Index: busdma_machdep.c > =================================================================== > RCS file: /net/cvs/home/ncvs/src/sys/i386/i386/busdma_machdep.c,v > retrieving revision 1.83 > diff -u -b -r1.83 busdma_machdep.c > --- busdma_machdep.c 24 Sep 2006 19:24:26 -0000 1.83 > +++ busdma_machdep.c 24 Sep 2006 21:45:39 -0000 > @@ -286,7 +286,7 @@ > > if (newtag->lowaddr < ptoa((vm_paddr_t)Maxmem) > || newtag->alignment > 1) > - newtag->flags |= BUS_DMA_COULD_BOUNCE; > + newtag->flags |= BUS_DMA_COULD_BOUNCE | BUS_DMA_USE_FILTER; > > if (((newtag->flags & BUS_DMA_COULD_BOUNCE) != 0) && > (flags & BUS_DMA_ALLOCNOW) != 0) { > > > $.02, > /Mikko >