On Thu, Dec 15, 2005 at 09:47:42AM +0300, Vitaly Wool wrote:Looking at my usbnet stuff, I can't share that opinion :-/
David Brownell wrote:
No, "stupid drivers will suffer"; nothing new. Just observeOne cannot allocate memory in interrupt context, so the way to go is allocating it on stack, thus the buffer is not DMA-safe.
how the ads7846 touchscreen driver does small async transfers.
Making it DMA-safe in thread that does the very message processing is a good way of overcoming this.
Using preallocated buffer is not a good way, since it may well be
already used by another interrupt or not yet processed by the worker
thread (or tasklet, or whatever).
Yes it is a good way. That's the way USB currently works in the kernel,
and it works just fine. It keeps the rules simple and everyone knows
what needs to be done.