linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Jon Derrick <jonathan.derrick@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 11:18:11 -0400	[thread overview]
Message-ID: <20160922151811.GA14301@keith> (raw)
In-Reply-To: <1474485155-10822-1-git-send-email-jonathan.derrick@intel.com>

On Wed, Sep 21, 2016 at 01:12:35PM -0600, Jon Derrick wrote:
>  void pciehp_queue_interrupt_event(struct slot *p_slot, u32 event_type)
>  {
> @@ -121,9 +133,24 @@ static int board_added(struct slot *p_slot)
>  
>  	pciehp_green_led_on(p_slot);
>  	pciehp_set_attention_status(p_slot, 0);
> +	if (ctrl->slot_retries)
> +		ctrl_dbg(ctrl, "Device added at %04x:%02x:00 after retry %d/%d\n",
> +			 pci_domain_nr(parent), parent->number,
> +			 ctrl->slot_retries, DEVICE_ADD_RETRIES);
> +
>  	return 0;
>  
>  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?

  reply	other threads:[~2016-09-22 15:18 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 [this message]
2016-09-22 21:05   ` Jon Derrick
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=20160922151811.GA14301@keith \
    --to=keith.busch@intel.com \
    --cc=helgaas@kernel.org \
    --cc=jonathan.derrick@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).