Skip to content

tools: kmod: remove snd_ump before snd_rawmidi - #1363

Open
harajend wants to merge 1 commit into
mainfrom
kmod-remove-snd-ump
Open

tools: kmod: remove snd_ump before snd_rawmidi#1363
harajend wants to merge 1 commit into
mainfrom
kmod-remove-snd-ump

Conversation

@harajend

Copy link
Copy Markdown
Contributor

Problem

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

lsmod from the failing run confirms nothing is actually using it — it is just loaded and in the way:

snd_ump                49152  0
snd_rawmidi            57344  1 snd_ump
snd_seq_device         16384  3 snd_seq,snd_ump,snd_rawmidi

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 at check-sof-logger.sh, each with the same reload_drivers() backtrace.

Fix

Remove snd_ump immediately before snd_rawmidi, matching the existing ordering convention for dependants in this file.

remove_module() already prints SKIP ... not loaded and continues for modules that are not present, so this is a no-op on kernels built without CONFIG_SND_UMP.

Testing

bash -n clean. Verified against the lsmod state above that snd_ump has no dependants of its own, so removing it at this point in the sequence cannot strand anything else.

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant