tools: kmod: remove snd_ump before snd_rawmidi - #1363
Open
harajend wants to merge 1 commit into
Open
Conversation
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>
harajend
requested review from
a team,
golowanow,
lgirdwood,
marc-hb and
plbossart
as code owners
August 22, 2026 03:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On MIDI2-enabled kernels
snd_umpis loaded even when nothing is using it, and it holds a reference onsnd_rawmidi.sof_remove.shhas no entry for it, so removal fails:lsmodfrom the failing run confirms nothing is actually using it — it is just loaded and in the way:Because
reload_drivers()aborts, every later test case that reloads the driver stack fails with it. On a NVL-S run this produced ~15 consecutive failures starting atcheck-sof-logger.sh, each with the samereload_drivers()backtrace.Fix
Remove
snd_umpimmediately beforesnd_rawmidi, matching the existing ordering convention for dependants in this file.remove_module()already printsSKIP ... not loadedand continues for modules that are not present, so this is a no-op on kernels built withoutCONFIG_SND_UMP.Testing
bash -nclean. Verified against thelsmodstate above thatsnd_umphas no dependants of its own, so removing it at this point in the sequence cannot strand anything else.🤖 Generated with Claude Code