netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	Joseph Salisbury <joseph.salisbury@canonical.com>,
	Kay Sievers <kay@vrfy.org>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	Tim Gardner <tim.gardner@canonical.com>,
	Pierre Fersing <pierre-fersing@pierref.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Benjamin Poirier <bpoirier@suse.de>,
	Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>,
	Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>,
	Sreekanth Reddy <sreekanth.reddy@avagotech.com>,
	Abhijit Mahajan <abhijit.mahajan@avagotech.com>,
	Hariprasad S <hariprasad@chelsio.com>,
	Santosh Rastapur <santosh@chelsio.com>,
	"MPT-FusionLinux.pdl@avagotech.com" <MPT-Fusi
Subject: Re: [PATCH 1/3] driver core: enable drivers to use deferred probe from init
Date: Mon, 28 Jul 2014 18:59:20 +0200	[thread overview]
Message-ID: <20140728165920.GF21930@wotan.suse.de> (raw)
In-Reply-To: <20140728165248.GE21930@wotan.suse.de>

On Mon, Jul 28, 2014 at 06:52:48PM +0200, Luis R. Rodriguez wrote:
> On Mon, Jul 28, 2014 at 03:46:32PM +0000, Yuval Mintz wrote:
> > > Subject: Re: [PATCH 1/3] driver core: enable drivers to use deferred probe from
> > > init
> > > 
> > > On Mon, Jul 28, 2014 at 03:12:11PM +0000, Yuval Mintz wrote:
> > > > Perhaps this is a silly question, but what guarantees that the
> > > > deferred probe list will actually be triggered, e.g., in case the
> > > > delayed device is the last device in the system?
> > > 
> > > The dev->init_delayed_probe is used to ensure that we'd add the device to the
> > > deferred probe list once making this a per device thing if the driver has the field
> > > delay_probe set to true. This technically also allows this to be a per device thing
> > > so with some more work we could enable drivers to only enable this for specific
> > > devices but at this point this did not seem required.
> > 
> > Sorry for not being clear, but I didn't meant 'what guarantees that the device
> > will be added to the deferred probe', but rather what guarantees that the
> > deferred workqueue will be scheduled.
> > 
> > To the best of my knowledge the deferring mechanism works only if one device
> > is dependent upon another, e.g., for Multi-function devices where one device
> > probe is dependent upon the others - which are soon-to-be probed.
> 
> The workqueue will be kicked when driver_deferred_probe_trigger() gets
> poked, we do that in the late_initcall(deferred_probe_initcall), it
> also gets flushed there with a flush_workqueue(deferred_wq).

But come to think of it that will work well for devices already plugged in
so indeed I think that driver_deferred_probe_add() needs a check added
for for if (!driver_deferred_probe_enable) then we have to
driver_deferred_probe_trigger(). The driver_deferred_probe_enable is set
to false upon init, but later on late init it gets set to true so with
that check we'd  only generate the trigger after late init call.

I can fold that in the v2.

  Luis

  reply	other threads:[~2014-07-28 16:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 14:34 [PATCH 1/3] driver core: enable drivers to use deferred probe from init Luis R. Rodriguez
2014-07-28 14:34 ` [PATCH 2/3] cxgb4: ask for deferred probe Luis R. Rodriguez
2014-07-28 14:34 ` [PATCH 3/3] mptsas: " Luis R. Rodriguez
2014-07-28 14:51 ` [PATCH 1/3] driver core: enable drivers to use deferred probe from init Takashi Iwai
2014-07-28 15:01   ` Luis R. Rodriguez
2014-07-28 15:12 ` Yuval Mintz
2014-07-28 15:38   ` Luis R. Rodriguez
2014-07-28 15:46     ` Yuval Mintz
2014-07-28 16:52       ` Luis R. Rodriguez
2014-07-28 16:59         ` Luis R. Rodriguez [this message]
2014-07-28 18:30           ` Yuval Mintz
2014-07-28 18:48             ` Luis R. Rodriguez

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=20140728165920.GF21930@wotan.suse.de \
    --to=mcgrof@suse.com \
    --cc=Yuval.Mintz@qlogic.com \
    --cc=abhijit.mahajan@avagotech.com \
    --cc=akpm@linux-foundation.org \
    --cc=bpoirier@suse.de \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=hariprasad@chelsio.com \
    --cc=joseph.salisbury@canonical.com \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@do-not-panic.com \
    --cc=nagalakshmi.nandigama@avagotech.com \
    --cc=oleg@redhat.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=pierre-fersing@pierref.org \
    --cc=praveen.krishnamoorthy@avagotech.com \
    --cc=santosh@chelsio.com \
    --cc=sreekanth.reddy@avagotech.com \
    --cc=tim.gardner@canonical.com \
    /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;
as well as URLs for NNTP newsgroup(s).