Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 89019ab7 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Greg Kroah-Hartman
Browse files

usb/gadget: f_midi: Replace tasklet with work



[ Upstream commit 8653d71ce3763aedcf3d2331f59beda3fecd79e4 ]

Currently a tasklet is used to transmit input substream buffer
data. However, tasklets have long been deprecated as being too
heavy on the system by running in irq context - and this is not
a performance critical path. If a higher priority process wants
to run, it must wait for the tasklet to finish before doing so.

Deferring work to a workqueue and executing in process context
should be fine considering the callback already does
f_midi_do_transmit() under the transmit_lock and thus changes in
semantics are ok regarding concurrency - tasklets being serialized
against itself.

Cc: Takashi Iwai <tiwai@suse.de>
Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
Acked-by: default avatarFelipe Balbi <balbi@kernel.org>
Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
Link: https://lore.kernel.org/r/20210111042855.73289-1-dave@stgolabs.net


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 4ab37fcb4283 ("USB: gadget: f_midi: f_midi_complete to call queue_work")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ec42b4a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment