Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kmod: fix hda-sdw-bpt dependency #1156

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

plbossart
Copy link
Member

We need to remove the SoundWire parts before removing hda-sdw-bpt

rmmod: ERROR: Module snd_sof_intel_hda_common is in use by: snd_sof_intel_hda_sdw_bpt

Link: https://sof-ci.01.org/linuxpr/PR4679/build1181/devicetest/index.html?model=MTLP_SDW_AIOC&testcase=check-kmod-load-unload

We need to remove the SoundWire parts before removing hda-sdw-bpt

rmmod: ERROR: Module snd_sof_intel_hda_common is in use by:
snd_sof_intel_hda_sdw_bpt

Link: https://sof-ci.01.org/linuxpr/PR4679/build1181/devicetest/index.html?model=MTLP_SDW_AIOC&testcase=check-kmod-load-unload
Signed-off-by: Pierre-Louis Bossart <[email protected]>
@plbossart plbossart requested a review from a team as a code owner January 25, 2024 10:51
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this backwards compatible with older kernels?

@plbossart
Copy link
Member Author

Is this backwards compatible with older kernels?

compatible with sof-dev for sure, and with my update in thesofproject/linux#4679.
I don't think there's an issue with older kernels but I haven't tested it (no time, etc).

@plbossart plbossart merged commit 65951c4 into thesofproject:main Feb 9, 2024
4 of 6 checks passed
@marc-hb
Copy link
Collaborator

marc-hb commented Apr 6, 2024

Is this backwards compatible with older kernels?

It's not compatible with 6.5:

rmmod: ERROR: Module soundwire_intel is in use by: snd_sof_intel_hda_common

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 6, 2024

workaround:

--- a/tools/kmod/sof_remove.sh
+++ b/tools/kmod/sof_remove.sh
@@ -117,12 +117,13 @@ remove_module snd_soc_avs
 remove_module snd_soc_hda_codec
 
 #-------------------------------------------
 # platform drivers
 #-------------------------------------------
 remove_module snd_sof_intel_hda_generic
+remove_module snd_sof_intel_hda_common
 
 #-------------------------------------------
 # SoundWire/SOF parts
 #-------------------------------------------
 remove_module soundwire_intel_init
 remove_module soundwire_intel

marc-hb added a commit to marc-hb/sof-test that referenced this pull request Apr 25, 2024
Fixes this failure with older kernel like the 6.5 kernels distributed by
Ubuntu:

 ERROR: Module soundwire_intel is in use by: snd_sof_intel_hda_common

Fixes commit 65951c4 ("kmod: fix hda-sdw-bpt dependency") which
unloaded all soundwire drivers earlier as a block. This is not a problem
with 6.9-ish kernels where snd_sof_intel_hda_common and soundwire_intel
can apparently be unloaded in any order but it is a problem with older
kernels.

So, unload `snd_sof_intel_hda_common` before soundwire modules to be
compatible with any kernel.

See thesofproject#1156 for more info.
@marc-hb
Copy link
Collaborator

marc-hb commented Apr 26, 2024

Is this backwards compatible with older kernels?

Fix submitted:

marc-hb added a commit to marc-hb/sof-test that referenced this pull request Apr 30, 2024
Fixes this failure with older kernel like the 6.5 kernels distributed by
Ubuntu:

 ERROR: Module soundwire_intel is in use by: snd_sof_intel_hda_common

Fixes commit 65951c4 ("kmod: fix hda-sdw-bpt dependency") which
unloaded all soundwire drivers earlier as a block. This is not a problem
with 6.9-ish kernels where snd_sof_intel_hda_common and soundwire_intel
can apparently be unloaded in any order but it is a problem with older
kernels.

So, unload `snd_sof_intel_hda_common` before soundwire modules to be
compatible with any kernel.

See thesofproject#1156 for more info.
marc-hb added a commit that referenced this pull request May 1, 2024
Fixes this failure with older kernel like the 6.5 kernels distributed by
Ubuntu:

 ERROR: Module soundwire_intel is in use by: snd_sof_intel_hda_common

Fixes commit 65951c4 ("kmod: fix hda-sdw-bpt dependency") which
unloaded all soundwire drivers earlier as a block. This is not a problem
with 6.9-ish kernels where snd_sof_intel_hda_common and soundwire_intel
can apparently be unloaded in any order but it is a problem with older
kernels.

So, unload `snd_sof_intel_hda_common` before soundwire modules to be
compatible with any kernel.

See #1156 for more info.
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.

None yet

2 participants