Martin Fuzzey a écrit :
quoted
We don't want to add support for this to DMA bounce. DMA bounce is already
a pain in the backside and causes its own set of problems - please let it
die a long slow but quite death.
If you want to see the kind of pain dmabounce causes, look at this long
standing and as yet unsolved bug:
http://bugzilla.kernel.org/show_bug.cgi?id=7760
Well I don't know the dmabounce code but why is using it likely to cause
OOM problems (at least why more so than copying the buffer in the HCD or
the usb core). In both cases there will be two copies of the buffer in
memory which could I agree be a problem in memory constrained systems.
But if we _do_ want to accept unaligned buffers from usb drivers I can't
see a way round that.
memmove is our friend :
the buffer allocated in usbnet got an offset.
All you have to do it remove this offset and memmove the data. That what
I did [1], and why it is better to do it in usb driver.
Matthieu
[1] http://article.gmane.org/gmane.linux.usb.general/28700