Subject: Re: lack of pciide transfer alignment checking causes crash
To: matthew green <mrg@eterna.com.au>
From: Jachym Holecek <freza@liberouter.org>
List: tech-kern
Date: 06/29/2005 03:13:03
Hello,

> > but how?  bus_dma is defined in <machine/bus.h> and afaik there is
> > no way to do what you are suggesting (without changing bus_dma.)
> 
> I think Thor has in mind something like this (certainly, I do)
> 
> pci0 at mainbus0
> bouncepci0 at pci0
> bouncepci0: using bounce buffers for transfers above 1Gb
> bce0 at bouncepci0
>
> bouncepci is a (MD?) bus, which provides implementations of the normal
> bus_dma interface that include internal bounce buffers.

And bouncecardbus0 for cardbus and bounce${foo}0 for ${foo} even
if the bouncing constraint (and the routine that implements it) is the
very same? Why, if you can just bounce inside the driver, possibly using
some bus_dma convenience routine?  Also note that the should-bounce-flag
may be dependent on chip revision or such, so the driver itself has to
make the decision anyway.

	Regards,
		-- Jachym Holecek