lkml.org 
[lkml]   [2017]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] driver core: add devices to deferred probe list when unbinding consumers
From
Date
Am Donnerstag, den 16.03.2017, 17:28 +0900 schrieb Greg Kroah-Hartman:
> On Wed, Mar 08, 2017 at 12:50:41PM +0100, Lucas Stach wrote:
> > When a device is unbound due to the provider of one of the resources going
> > away, add it to the deferred probe list. This way the consumer device
> > driver gets a chance to rebind itself if the provider is rebound later on.
>
> Ick, no, if someone unbinds the driver, it's gone, don't try to keep
> things around. Wasn't this rejected previously?

This doesn't keep anything around. It just adds the consumer device to
the deferred probe list. So they are properly unbound, but have a chance
to re-probe once the provider comes up again.

Simple example:
1. Unload the module for regulator driver
2. All consumers get unbound due to the device dependency between the
regulator and the consumer devices
3. modprobe the regulator module again

What happens today is that the consumers stay in non-functional state
due to their drivers being gone. With the proposed patch the consumer
drivers go through their probe routine again. If all the needed
resources are available again (the regulator driver is up again) they
can return to a functional state.

All this is just normal hotplug and deferred probing, there is no
additional state kept around.

Regards,
Lucas

\
 
 \ /
  Last update: 2017-03-16 10:27    [W:0.029 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site