openwrt/package/kernel
Jan Hoffmann 1700424553 ltq-vdsl-mei: add locking to interrupt handler
Some users noticed repeated resyncs at random intervals, which go away
when the MEI driver is configured to use polling instead of interrupts.
Debugging shows that this seems to be caused by concurrent calls to
MEI_ReadMailbox (in the interrupt handler) and MEI_WriteMailbox. This
appears to be mostly triggered when there is an interrupt for vectoring
error reports.

In polling mode, calls to MEI_ReadMailbox are protected by the same
semaphore as is used in MEI_WriteMailbox. When interrupts are used,
MEI_WriteMailbox appears to rely on MEI_DisableDeviceInt and
MEI_EnableDeviceInt to provide mutual exclusion with the interrupt
handler. These functions mask/unmask interrupts, and there is an
additional check of the mask in the interrupt handler itself. However,
this is not sufficient on systems with SMP, as the interrupt handler
may be running in parallel, and could already be past the interrupt
mask check at this point.

This adds a lock to the interrupt handler, and also acquires this lock
in MEI_DisableDeviceInt. This should make sure that after a call to
MEI_DisableDeviceInt the interrupt is masked, and the interrupt handler
is either not running, has alread finished its work, or is still before
the interrupt mask check, and is thus going to detect the change.

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
2022-03-21 12:28:37 +00:00
..
acx-mac80211
ath10k-ct ath10k-ct: Fix spectral scan NULL pointer 2021-11-29 21:48:03 +01:00
bcm27xx-gpu-fw bcm27xx-gpu-fw: update to latest version 2021-08-21 19:07:06 +02:00
bcm63xx-cfe bcm63xx-cfe: update to the latest master 2021-06-22 13:27:41 +02:00
bpf-headers bpf-headers: ship a modified version of stdarg.h from musl to fix ebpf build on glibc 2022-03-07 10:38:41 +01:00
broadcom-wl
button-hotplug
cryptodev-linux cryptodev-linux: update to 1.12 2021-09-29 22:56:59 +02:00
dtc/patches
gpio-button-hotplug gpio-button-hotplug: convert to gpio descriptor (gpiod_) API 2021-08-26 21:00:26 +02:00
gpio-nct5104d
hwmon-gsc kernel: update dependencies after 'imx6' -> 'imx' rename 2021-11-03 12:45:40 +01:00
ksmbd ksmbd: add out-of-tree module 2022-02-19 18:29:42 +01:00
lantiq ltq-vdsl-mei: add locking to interrupt handler 2022-03-21 12:28:37 +00:00
linux kernel/modules: add kmod-inet-diag package 2022-03-13 19:24:13 +01:00
mac80211 mac80211: backport MBSSID support 2022-03-18 14:38:27 +01:00
mt76 mt76: update to the latest version 2022-03-15 10:46:10 +01:00
mt7621-qtn-rgmii
mwlwifi
nat46 nat46: update to latest git HEAD 2021-12-05 18:40:19 +01:00
rtc-rv5c386a
rtl8812au-ct rtl8812au-ct: update driver to be ready for 5.15 2021-12-11 00:50:02 +01:00
trelay