Skip to content

Commit 954bad3

Browse files
harajendclaude
authored andcommitted
tools: kmod: remove snd_ump before snd_rawmidi
On MIDI2-enabled kernels snd_ump is loaded even when nothing is using it, and it holds a reference on snd_rawmidi. sof_remove.sh has no entry for it, so removal fails: RMMOD snd_rawmidi rmmod: ERROR: Module snd_rawmidi is in use by: snd_ump /home/ubuntu/sof-test/tools/kmod/sof_remove.sh FAILED That aborts reload_drivers() and every subsequent test case that reloads the driver stack fails with it -- on a NVL-S run this turned into ~15 consecutive failures starting at check-sof-logger. Remove snd_ump just before snd_rawmidi. remove_module() already SKIPs modules that are not loaded, so this is a no-op on kernels built without CONFIG_SND_UMP. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 8930ea6 commit 954bad3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎tools/kmod/sof_remove.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,12 @@ remove_module snd_pcm
346346
remove_module snd_ctl_led
347347
remove_module snd_seq_midi
348348
remove_module snd_seq_midi_event
349+
# MIDI 2.0 UMP support holds a reference on snd_rawmidi (and on snd_seq_device),
350+
# so it has to go first. It gets loaded on MIDI2-enabled kernels even when
351+
# nothing is using it, which made snd_rawmidi removal fail with
352+
# rmmod: ERROR: Module snd_rawmidi is in use by: snd_ump
353+
# aborting reload_drivers() and cascading into every driver-reload test case.
354+
remove_module snd_ump
349355
remove_module snd_rawmidi
350356
remove_module snd_seq_dummy
351357
remove_module snd_seq

0 commit comments

Comments
 (0)