OpenCloudOS-Kernel/drivers/staging/axis-fifo
Quentin Deslandes 0443b3f443 staging: axis-fifo: replace spinlock with mutex
Following the device's documentation guidance, reading a packet from the
device or writing a packet to it must be atomic. Previously, only
reading device's vacancy (before writing on it) or occupancy (before
reading from it) was locked. Hence, effectively reading the packet or
writing the packet wasn't locked at all. However, reading a packet (and
writing one, to a lesser extent) requires to read 3 different registers
in a specific order, without missing one or else we should reset the
device.

This patch fixes the device's locking mechanism on the FIFO character
device. As the device was using copy_from_user() and copy_to_user(), we
need to replace spinlocks with mutexes.

Signed-off-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
Link: https://lore.kernel.org/r/20200121103958.12941-1-quentin.deslandes@itdev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-22 09:58:01 +01:00
..
Kconfig staging: axis-fifo: add unspecified HAS_IOMEM dependency 2019-12-17 09:22:11 +01:00
Makefile staging: add missing SPDX lines to Makefile files 2019-04-03 11:10:15 +02:00
README
axis-fifo.c staging: axis-fifo: replace spinlock with mutex 2020-01-22 09:58:01 +01:00
axis-fifo.txt staging: axis-fifo: avoid parsing ignored device tree properties 2019-11-03 13:09:01 +01:00

README