Re: i386/busmda_machdep.c 1.81 broke if_bfe

From: Scott Long <scottl_at_samsco.org>
Date: Tue, 26 Sep 2006 17:17:03 -0600
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
> _at__at_ -286,7 +286,7 _at__at_
> 
>      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
> 
Received on Tue Sep 26 2006 - 21:17:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:00 UTC