> I think the best thing we could do is to calculate the DMA_MIN_BYTES in the > driver based on the SPI speed. Something which will give ~160 in the speed in > which the wl driver is used and something which works best in your setup in > the speed you are using the SPI bus. > The best way is to give some msec as a limit. If the transfer would take more > then X msec on the bus to be transferred, we will use DMA, if it is less than > that we fall back to PIO. > Yes, the CPU speed is not taken into account, but IMHO the bus speed is more > Changing DMA_MIN_BYTES to, say, "dma_min_time_ms" sounds reasonable to me. I don't know how to compute it completely accurately as some SPI implementations I've seen seem to like to inject little delays between bytes for some reason, but a reasonable enough estimate should just be spi_transfer_time_ms = (bits * 1000) / spi_clock_speed. I would like to have the ability to configure it without a kernel recompile, though. Would a kernel param (module_param) be acceptable for this application? You don't happen to know the WL12xx SPI clock speed off the top of your head, do you? Regards, Greg -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html