On Fri, Jan 18, 2019 at 10:37 AM Lucas Stach l.stach@pengutronix.de wrote:
Am Donnerstag, den 17.01.2019, 13:20 +0100 schrieb Daniel Vetter: [...]
I don't think it is addressed here.
Can anyone please explain to me what happens in more detail?
My understanding (and this might be wrong, Russell, Andrzej, ... pls correct) is that the following sequence goes wrong:
- componentized driver (both producer and consumer) fully loaded&working
- you unbind the producer/one of the components
- component framework or driver core through device_link also unbinds
the master/consumer
- you reload/rebind the component
- with the component framework this results in the master being
rebound, and the overall driver working again. With device_links nothing happens.
I think there was a patch floating around once to put drivers unbound due to device_links onto the deferred probe list, so that the next time something is bound they have a chance to rebind. But I can't find that patch anymore, maybe someone else has the link still?
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1348023.html https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1355243.html
I can repost if this is finally deemed a good idea.
I don't think this will help.
Two things appear to be needed here: missing suppliers need to be probed automatically at a consumer probe time and "persistent" links created by ->probe() callbacks should not be reference-counted when those callbacks run again. I'm going to cut a patch to do that (early next week if all goes well).