Skip to content

Commit 596c195

Browse files
TropicaoKalle Valo
authored andcommitted
wifi: wilc1000: document SRCU usage instead of SRCU
Commit f236464 ("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
1 parent 3596717 commit 596c195

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • drivers/net/wireless/microchip/wilc1000

drivers/net/wireless/microchip/wilc1000/netdev.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@ struct wilc {
220220

221221
/* protect vif list */
222222
struct mutex vif_mutex;
223+
/* Sleepable RCU struct to manipulate vif list. Sleepable version is
224+
* needed over the classic RCU version because the driver's current
225+
* design involves some sleeping code while manipulating a vif
226+
* retrieved from vif list (so in a SRCU critical section), like:
227+
* - sending commands to the chip, using info from retrieved vif
228+
* - registering a new monitoring net device
229+
*/
223230
struct srcu_struct srcu;
224231
u8 open_ifcs;
225232

0 commit comments

Comments
 (0)