On Friday 14 November 2008, Ned Forrester wrote: > David Brownell wrote: > > Mapping any number of times *should* be OK -- unless one mapping > > reports an error. Or you do them in the wrong order (removing > > cache entries before writing their data out to memory). > > BINGO! That was it.
Good news! I haven't lost it yet. ;) > pxa2xx_spi has always done > > dma_map_single(..., rx, ..., DMA_FROM_DEVICE) > > (thus invalidating the cache) before > > dma_map_single(..., tx, ..., DMA_TO_DEVICE) > > (thus copying possibly invalid data, if the buffers overlapped). > > Thanks, it works now with a much more pleasant patch. Yeah, mostly just swapping two blocks of code. Much nicer. > I never looked at > it that way before. A patch will be coming soon. Worth auditing the other SPI controller drivers too. That'd be easy to get wrong. Hmmm ... au1550 and iMX goof it too, while atmel_spi and omap2_mcspi get it right. Wouldn't you know ... the only DMA capable SPI drivers I used in DMA mode don't have this problem. ;) - Dave > -- > Ned Forrester [EMAIL PROTECTED] > Oceanographic Systems Lab 508-289-2226 > Applied Ocean Physics and Engineering Dept. > Woods Hole Oceanographic Institution Woods Hole, MA 02543, USA > http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212 > http://www.whoi.edu/hpb/Site.do?id=1532 > http://www.whoi.edu/page.do?pid=10079 > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
