public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, kernel@pengutronix.de,
	patchwork-lst@pengutronix.de
Subject: Re: [PATCH] driver core: add devices to deferred probe list when unbinding consumers
Date: Thu, 16 Mar 2017 10:26:22 +0100	[thread overview]
Message-ID: <1489656382.16018.16.camel@pengutronix.de> (raw)
In-Reply-To: <20170316082804.GA24043@kroah.com>

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

      reply	other threads:[~2017-03-16  9:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 11:50 [PATCH] driver core: add devices to deferred probe list when unbinding consumers Lucas Stach
2017-03-16  8:28 ` Greg Kroah-Hartman
2017-03-16  9:26   ` Lucas Stach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489656382.16018.16.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patchwork-lst@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox