> > > 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html