summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAlexis Lothoré <alexis.lothore@bootlin.com>2024-05-28 17:20:30 +0300
committerKalle Valo <kvalo@kernel.org>2024-06-01 12:59:30 +0300
commit596c195680dceb34e6b994ff5571331d5dba8299 (patch)
treec61878c436e8c3067eda96f5d1af38e9ddceb384 /drivers/net
parent3596717a6fbd54c64e97e085a9f77ed511ff59f9 (diff)
downloadlinux-596c195680dceb34e6b994ff5571331d5dba8299.tar.xz
wifi: wilc1000: document SRCU usage instead of SRCU
Commit f236464f1db7 ("wifi: wilc1000: convert list management to RCU") attempted to convert SRCU to RCU usage, assuming it was not really needed. The runtime issues that arose after merging it showed that there are code paths involving sleeping functions, and removing those would need some heavier driver rework. Add some documentation about SRCU need to make sure that any future developer do not miss some use cases if tempted to convert back again to RCU. Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240528-wilc_revert_srcu_to_rcu-v1-3-bce096e0798c@bootlin.com
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/microchip/wilc1000/netdev.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/netdev.h b/drivers/net/wireless/microchip/wilc1000/netdev.h
index 5937d6d45695..fde8610a9c84 100644
--- a/drivers/net/wireless/microchip/wilc1000/netdev.h
+++ b/drivers/net/wireless/microchip/wilc1000/netdev.h
@@ -220,6 +220,13 @@ struct wilc {
/* protect vif list */
struct mutex vif_mutex;
+ /* Sleepable RCU struct to manipulate vif list. Sleepable version is
+ * needed over the classic RCU version because the driver's current
+ * design involves some sleeping code while manipulating a vif
+ * retrieved from vif list (so in a SRCU critical section), like:
+ * - sending commands to the chip, using info from retrieved vif
+ * - registering a new monitoring net device
+ */
struct srcu_struct srcu;
u8 open_ifcs;