fw_devlink.strict=1 breaks sound card probe ?
Hi Renesas-ML
Cc Saravana, Greg, Laurent, Geert
I'm now testing v6.0.0-rc2 kernel on ULCB-KF board, and I noticed it doesn't probe sound card.
I git-bisected and noticed that this patch breaks sound probe.
commit 71066545b48e4259f89481199a0bbc7c35457738
("driver core: Set fw_devlink.strict=1 by default")I could re-probe sound card if I reverted it.
(My .config is using Y for all drivers)
I'm not well understanding about this patch,
but it seems it is related to deferred probe.
My sound card needs many drivers to probe.
HDMI
Sound CPU
Sound Codec x 2 (depends on I2C)
Sound Card
To probe "Sound Card", it needs other necessary drivers.
But it seems some necessary drivers are not probed by above patch. In my quick check, "HDMI" and 1 of "Sound Codec" drivers are not probed.
How can I solve this issue, or where I can check ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Hi Morimoto-san,
Quoted 24 lines · Kuninori Morimoto
Hi Renesas-ML
Cc Saravana, Greg, Laurent, GeertI'm now testing v6.0.0-rc2 kernel on ULCB-KF board, and I noticed it doesn't probe sound card.
I git-bisected and noticed that this patch breaks sound probe.commit 71066545b48e4259f89481199a0bbc7c35457738 ("driver core: Set fw_devlink.strict=1 by default")I could re-probe sound card if I reverted it.
(My .config is using Y for all drivers)I'm not well understanding about this patch,
but it seems it is related to deferred probe.My sound card needs many drivers to probe.
HDMI
Sound CPU
Sound Codec x 2 (depends on I2C)
Sound Card
Quoted 5 lines
To probe "Sound Card", it needs other necessary drivers.
But it seems some necessary drivers are not probed by above patch. In my quick check, "HDMI" and 1 of "Sound Codec" drivers are not probed.How can I solve this issue, or where I can check ?
Saravana is more familiar with devlink than I am, so he may be able to diagnose that without further information, but otherwise it would be helpful if you could provide some logs. Enabling the debug messages in drivers/base/dd.c can provide some insight. The contents of the debugfs devices_deferred file can also be useful, as well as the consumer/supplier links in sysfs for all the devices involved with the sound card.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 34 lines · Laurent Pinchart
Hi Morimoto-san,
Quoted 24 lines · Kuninori Morimoto
Hi Renesas-ML
Cc Saravana, Greg, Laurent, GeertI'm now testing v6.0.0-rc2 kernel on ULCB-KF board, and I noticed it doesn't probe sound card.
I git-bisected and noticed that this patch breaks sound probe.commit
71066545b48e4259f89481199a0bbc7c35457738("driver core: Set fw_devlink.strict=1 by default")I could re-probe sound card if I reverted it.
(My .config is using Y for all drivers)I'm not well understanding about this patch,
but it seems it is related to deferred probe.My sound card needs many drivers to probe.
HDMI
Sound CPU
Sound Codec x 2 (depends on I2C)
Sound CardQuoted 5 lines
To probe "Sound Card", it needs other necessary drivers.
But it seems some necessary drivers are not probed by above patch. In my quick check, "HDMI" and 1 of "Sound Codec" drivers are not probed.How can I solve this issue, or where I can check ?
Quoted 7 lines
Saravana is more familiar with devlink than I am, so he may be able to diagnose that without further information, but otherwise it would be helpful if you could provide some logs. Enabling the debug messages in
drivers/base/dd.ccan provide some insight. The contents of the debugfsdevices_deferredfile can also be useful, as well as the consumer/supplier links in sysfs for all the devices involved with the sound card.
Thanks Laurent!
Kuninori, Those are exactly the things I'd need. And a pointer to the dts (not DTSI) file that corresponds to the board.
Also, (I don't think it'll help but might give info for debugging), try booting with deferred_probe_timeout=0 and deferred_probe_timeout=1.
-Saravana
Hi Laurent, Saravana
Thank you for your help !!
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
To probe "Sound Card", it needs other necessary drivers.
But it seems some necessary drivers are not probed by above patch. In my quick check, "HDMI" and 1 of "Sound Codec" drivers are not probed.
(snip)
Quoted 7 lines
Quoted 7 lines
Saravana is more familiar with devlink than I am, so he may be able to diagnose that without further information, but otherwise it would be helpful if you could provide some logs. Enabling the debug messages in
drivers/base/dd.ccan provide some insight. The contents of the debugfsdevices_deferredfile can also be useful, as well as the consumer/supplier links in sysfs for all the devices involved with the sound card.
Thanks !
This devices_deferred file (which I didn't know) helped my issue. It was my fault. My .config had been missing necessary driver (= CONFIG_REGULATOR_FIXED_VOLTAGE).
... but... why it had been working without it before... ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Hi Morimoto-san,
Quoted 12 lines · Kuninori Morimoto
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
To probe "Sound Card", it needs other necessary drivers.
But it seems some necessary drivers are not probed by above patch. In my quick check, "HDMI" and 1 of "Sound Codec" drivers are not probed.(snip)
Quoted 7 lines
Quoted 7 lines
Saravana is more familiar with devlink than I am, so he may be able to diagnose that without further information, but otherwise it would be helpful if you could provide some logs. Enabling the debug messages in
drivers/base/dd.ccan provide some insight. The contents of the debugfsdevices_deferredfile can also be useful, as well as the consumer/supplier links in sysfs for all the devices involved with the sound card.
Quoted 7 lines
Thanks !
This
devices_deferredfile (which I didn't know) helped my issue. It was my fault. My .config had been missing necessary driver (=CONFIG_REGULATOR_FIXED_VOLTAGE).... but... why it had been working without it before... ?
I guess the adi,adv7513 and ti,pcm3168a drivers consider regulators optional, so when they probe, they succeed?
With devlinks enabled, they are never probed, as their dependencies didn't probe due to the missing regulator driver.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 24 lines · Geert Uytterhoeven
Hi Morimoto-san,
Quoted 19 lines · Kuninori Morimoto
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
To probe "Sound Card", it needs other necessary drivers.
But it seems some necessary drivers are not probed by above patch. In my quick check, "HDMI" and 1 of "Sound Codec" drivers are not probed.(snip)
Quoted 7 lines
Quoted 7 lines
Saravana is more familiar with devlink than I am, so he may be able to diagnose that without further information, but otherwise it would be helpful if you could provide some logs. Enabling the debug messages in
drivers/base/dd.ccan provide some insight. The contents of the debugfsdevices_deferredfile can also be useful, as well as the consumer/supplier links in sysfs for all the devices involved with the sound card.Thanks !
This
devices_deferredfile (which I didn't know) helped my issue. It was my fault. My .config had been missing necessary driver (=CONFIG_REGULATOR_FIXED_VOLTAGE).... but... why it had been working without it before... ?
Hi Morimoto-san,
Hmmm... even if you didn't have the driver compiled in, fw_devlink should have stopped blocking the probe after deferred_probe_timeout expires and that value is defaulted to 10s (it extends on every successful driver registration). Can you help figure out if that's happening and if not, why not?
Thanks,
Saravana
Quoted 17 lines
I guess the adi,adv7513 and ti,pcm3168a drivers consider regulators optional, so when they probe, they succeed?
With devlinks enabled, they are never probed, as their dependencies didn't probe due to the missing regulator driver.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert, Saravana
Cc: Wolfram
Quoted 6 lines
Quoted 5 lines
Quoted 5 lines
This
devices_deferredfile (which I didn't know) helped my issue. It was my fault. My .config had been missing necessary driver (=CONFIG_REGULATOR_FIXED_VOLTAGE).... but... why it had been working without it before... ?
Quoted 7 lines
Hi Morimoto-san,
Hmmm... even if you didn't have the driver compiled in,
fw_devlinkshould have stopped blocking the probe afterdeferred_probe_timeoutexpires and that value is defaulted to 10s (it extends on every successful driver registration). Can you help figure out if that's happening and if not, why not?
It is very deep and difficult to understand / trace. I'm still not yet find the core point.
But something found. I hope it can be hint.
I'm using this DT
linux/arch/arm64/boot/dts/renesas/r8a77950-ulcb-kf.dts
The key config was "CONFIG_REGULATOR" (not "CONFIG_REGULATOR_FIXED_VOLTAGE"). If .config doesn't have "CONFIG_REGULATOR" and "fw_devlink_strict = true", some drivers probe will be deferd.
No issue will be happend if it has "CONFIG_REGULATOR".
Below is my .config case.
(It will be more drivers if I used renesas_defconfig).
# cat /sys/kernel/debug/devices_deferred 16-0044 i2c: supplier regulator-snd_vcc5v not ready sound asoc-audio-graph-card: parse error
If you can use "renesas_defconfig", you can reproduce it if you remove CONFIG_REGULATOR from it.
Here, "16-0044" is "pcm3168a" which needs "snd_vcc5v" and "snd_3p3v", and "sound" needs "pcm3168a".
"pcm3168a" connection is like this
-- linux/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi -- i2c2 - i2c-switch@71 (pca9548) - i2c@7
=> - pcm3168a
In this case, it will get -EPROBE_DEFER forever.
driver_probe_device()
- __driver_probe_device()
- really_probe()
- device_links_check_suppliers() :: return -EPROBE_DEFER
Thus, pcm3168a's probe function itself is not (never) called.
One thing I have noticed is that I2C numbering is changed somehow. I'm not sure this is related to the issue.
fw_devlink_strict = true : 16-0044 fw_devlink_strict : 15-0044
If you can indicate something to check, I'm happy to investigate it.
Thank you for your help !!
Best regards
---
Kuninori Morimoto