[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1489656382.16018.16.camel@pengutronix.de>
Date: Thu, 16 Mar 2017 10:26:22 +0100
From: Lucas Stach <l.stach@...gutronix.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, kernel@...gutronix.de,
patchwork-lst@...gutronix.de
Subject: Re: [PATCH] driver core: add devices to deferred probe list when
unbinding consumers
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
Powered by blists - more mailing lists