summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2019-05-14 12:14:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-21 12:15:53 +0200
commitb7382c73b2d7102154cb077dde9aa9370b776874 (patch)
tree3bc176d23ca7d0ea7d382838653022c56de63628 /init
parenttty: max310x: Introduce max310x_one port macro-wrapper (diff)
downloadlinux-b7382c73b2d7102154cb077dde9aa9370b776874.tar.xz
linux-b7382c73b2d7102154cb077dde9aa9370b776874.zip
tty: max310x: Don't pass stacked buffers to SPI
SPI transfer tx/rx buffers must be DMA-safe and the structure documentation clearly states this. Data declared on the system stack isn't DMA-safe [1]. Instead at least kernel memory should be used for the buffers. In order to fix this here we can create the buffers at the device probing stage and use them without any synchronization, since batch read/write methods are called from non-reentrant contexts - either from rx-event IRQ threaded handler or from the tx workqueue item. [1] Documentation/DMA-API-HOWTO.txt Signed-off-by: Serge Semin <fancer.lancer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions