> > > Here comes another idea, can we add a capability flag in struct > > spi_master indicating the master supporting poll or dma or both. > > Also we add similar bits in struct spi_transfer indicating the this > > transfer wants to be handled in poll or dma mode. > > Let's not do either of those. There's no need to introduce such > complexity, or to enable the associated new failure modes and bugs.
This idea has nothing to do with the dma-safe problem you pointed out, I will make the buffer dma safe anyway. What I proposed just wants to provide some flexibility for protocol device drivers, it will use dma-safe buffer always, but it prefer not to use DMA for its one-word transfers, and hope to have a choice to do that. For current existing controller and device drivers, they can simply ignore the new working mode setting in struct spi_master and spi_transfer and leave them as 0. Thanks, Feng > > Much simpler to just use DMA-safe I/O buffers in the first place ... > which is what pretty much every driver stack in Linux already expects > or requires. > > - Dave > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general