forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Labels
APLApplies to ApolloLake platformApplies to ApolloLake platformCMLApplies to Comet Lake platformApplies to Comet Lake platformCNLApplies to CannonlakeApplies to CannonlakeGLKApplies to Gemini LakeApplies to Gemini LakeICLApplies to Icelake platformApplies to Icelake platformP1Blocker bugs or important featuresBlocker bugs or important featuresupstream blockerMandatory for upstreamMandatory for upstream
Description
Timing issues reported on Skylake expose a conceptual issue in the way the HDaudio probe is handled.
Currently the probe flow is
hda_dsp_probe
-- hda_init_caps
---- hda_codec_i915_init
------ snd_hdac_i915_init
-------- request_module("i915");
---- hda_codec_probe_bus
------ hda_codec_probe
-------- request_module("Hdaudio xyz")
As explained by Takashi Iwai on the alsa-devel mailing list:
you shouldn't call request_module() in the driver's probe
callback. When the probe callback is called from the module loading,
it blocks the module loading itself, hence loading yet another module
can't work. A situation might be easier than the past (which
deadlocked), but still it's advised to use either the
request_module_nowait() with the callback or call request_module()
asynchronously from probe.
The request is to move init_caps to a work queue, and cancel it on remove.
Note that this will impact how hardware initialization issues are handled. We already know that errors on driver_probe happening when platform_device_register_data() is called will not be propagated, and the probe might actually be executed later. with a workqueue errors will be even harder to be made available to higher level PCI drivers.
Metadata
Metadata
Assignees
Labels
APLApplies to ApolloLake platformApplies to ApolloLake platformCMLApplies to Comet Lake platformApplies to Comet Lake platformCNLApplies to CannonlakeApplies to CannonlakeGLKApplies to Gemini LakeApplies to Gemini LakeICLApplies to Icelake platformApplies to Icelake platformP1Blocker bugs or important featuresBlocker bugs or important featuresupstream blockerMandatory for upstreamMandatory for upstream