linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Derrick <jonathan.derrick@intel.com>
To: Keith Busch <keith.busch@intel.com>
Cc: helgaas@kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCHv2] PCI/Hotplug: Schedule device add retries
Date: Thu, 22 Sep 2016 15:05:20 -0600	[thread overview]
Message-ID: <20160922210519.GA6274@localhost.localdomain> (raw)
In-Reply-To: <20160922151811.GA14301@keith>

> >  err_exit:
> > +	if (ctrl->slot_retries++ < DEVICE_ADD_RETRIES) {
> > +		ctrl_dbg(ctrl, "Retrying (%d/%d) device add at %04x:%02x:00\n",
> > +			ctrl->slot_retries, DEVICE_ADD_RETRIES,
> > +			pci_domain_nr(parent), parent->number);
> > +		pciehp_queue_power_work(p_slot, ENABLE_RETRY_REQ);
> > +		return retval;
> > +	}
> 
> Does the retry need to be requeued instead of just doing this in a loop?

The requeue gives a little bit more time and performs the actions in pciehp_enable_slot in case something has changed.

We could push the loop to within pciehp_enable_slot, but that could cause us to potentially miss DISABLE_REQ events.
..
That brings up the question about racing with DISBALE_REQ. If a power controller is implemented, a DISABLE_REQ request will disable the slot, which could then be reenabled by the ENABLE_RETRY_REQ path. Would disabling and reenabling the slot's power just cause the same faults over and over again? I'm not so sure.

  reply	other threads:[~2016-09-22 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 19:12 [PATCHv2] PCI/Hotplug: Schedule device add retries Jon Derrick
2016-09-22 15:18 ` Keith Busch
2016-09-22 21:05   ` Jon Derrick [this message]
2016-10-21 21:22 ` Bjorn Helgaas

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=20160922210519.GA6274@localhost.localdomain \
    --to=jonathan.derrick@intel.com \
    --cc=helgaas@kernel.org \
    --cc=keith.busch@intel.com \
    --cc=linux-pci@vger.kernel.org \
    /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).