On 25/10/2021 16:30, Tadeusz Struk wrote:
No, we want a hard stop here. At this point the venus_core probe()
has finished and it failed. Returning -EPROBE_DEFER here will just
cause it to loop infinitely.
I don't think there's any guarantee at all, that core probe() has
completed at that point.
of_platform_populate() doesn't guarantee ordering of the probe()
completing before or after the probe() of the platform drivers that are
associated with the devices in of_platform_populate().
When you think it about it can't do that and you wouldn't want it to do
that since a device might have a legitimate reason to EPROBE_DEFER
As an example core could call of_platform_populate() and then as a
ridiculous example go to sleep for five seconds - in which case it is
perfectly possible the encoder and decoder probe() functions will bug
out illegitimately waiting because of core->state != CORE_INIT
This is a problem we have and still haven't solved in
drivers/usb/dwc3/dwc3-qcom.c::probe() and child devices
drivers/usb/dwc3/dwc3-qcom.c
Here:
https://patches.linaro.org/cover/470387/
There's no serialisation guarantee between parent and child on
of_platform_populate() - at least none I'm aware of.
---
bod