Subject: Re: lack of pciide transfer alignment checking causes crash
To: Jason Thorpe <thorpej@shagadelic.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 06/25/2005 21:42:03
On Sat, Jun 25, 2005 at 12:36:13PM -0700, Jason Thorpe wrote:
> 
> On Jun 25, 2005, at 12:11 PM, Manuel Bouyer wrote:
> 
> >Yes, this should work. But I think it's better and easier to do the
> >I/O to a properly aligned buffer and data copy to/from this buffer.
> >This can easily be done in the dma_start and dma_finish callbacks.
> >Of course, if the supplied buffer is already properly aligned, just  
> >use it.
> 
> Why bother with a bounce buffer when we can just do PIO?

Because I suspect it would be less code, and probably faster when we don't
have a properly-aligned buffer.

> Most of the  
> time, we're not going to tickle the fallback case.

Unless you use tools that work on the raw device. Using PIO could slow down
dump(8) a lot, for example.

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--