ipq40xx: essedma: Fix dead lock
authorMasafumi UTSUGI <mutsugi@allied-telesis.co.jp>
Tue, 1 Oct 2019 09:59:18 +0000 (18:59 +0900)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 20 Oct 2019 13:16:31 +0000 (15:16 +0200)
commitbf800022b2529e50ac28efcefebe629edd519e89
treefc1402c62781aeca4771485438ca468aed71bc94
parentcd1136e55012c6bc969a2b38c550e35ea8296348
ipq40xx: essedma: Fix dead lock

edma_read_append_stats() gets called from two places in the driver.
The first place is the kernel timer that periodically updates
the statistics, so nothing gets lost due to overflows.
The second one it's part of the userspace ethtool ioctl handler
to provide up-to-date values.

For this configuration, the use of spin_lock() is not sufficient
and as per:
<https://mirrors.edge.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/c214.html>
the locking has to be upgraded to spin_lock_bh().

Signed-off-by: Masafumi UTSUGI <mutsugi@allied-telesis.co.jp>
[folded patch into 710-, rewrote message]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit f1d761f95e9664a9c11ce1b98f9e121b43c79d35)
target/linux/ipq40xx/patches-4.14/710-net-add-qualcomm-essedma-ethernet-driver.patch