Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602065 > unrolled thread

Re: [PATCH] driver core: add devices to deferred probe list when unbinding consumers

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-03-16 09:30 +0100
Last post2017-03-16 10:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] driver core: add devices to deferred probe list when  unbinding consumers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-03-16 09:30 +0100
    Re: [PATCH] driver core: add devices to deferred probe list when  unbinding consumers Lucas Stach <l.stach@pengutronix.de> - 2017-03-16 10:30 +0100

#1602065 — Re: [PATCH] driver core: add devices to deferred probe list when unbinding consumers

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-03-16 09:30 +0100
SubjectRe: [PATCH] driver core: add devices to deferred probe list when unbinding consumers
Message-ID<tlyXf-3YD-5@gated-at.bofh.it>
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?

thanks,

greg k-h

[toc] | [next] | [standalone]


#1602126

FromLucas Stach <l.stach@pengutronix.de>
Date2017-03-16 10:30 +0100
Message-ID<tlzTk-4Bt-17@gated-at.bofh.it>
In reply to#1602065
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web