linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Spassov, Stanislav" <stanspas@amazon.de>
To: "helgaas@kernel.org" <helgaas@kernel.org>
Cc: "alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"ashok.raj@intel.com" <ashok.raj@intel.com>,
	"okaya@kernel.org" <okaya@kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"Wang, Wei" <wawei@amazon.de>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"Schoenherr, Jan H." <jschoenh@amazon.de>,
	"rajatja@google.com" <rajatja@google.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH 2/3] PCI: Introduce per-device reset_ready_poll override
Date: Mon, 24 Feb 2020 18:05:02 +0000	[thread overview]
Message-ID: <52543631a871ba576b9711d5b6a3fad12019cece.camel@amazon.de> (raw)
In-Reply-To: <20200224143450.GA219843@google.com>

On Mon, 2020-02-24 at 08:34 -0600, Bjorn Helgaas wrote:
> I like the factoring out of the timeout, since all callers of
> pci_dev_wait() supply the same value.  That could be its own separate
> preliminary patch...

Agreed. The next version of this patch series will do the refactor separately.

I am thinking we might also want to replace the "reset_type" with an enum
that indexes into an array to get the string, but -- more importantly --
indexes into an array of per-device overrides for the various reset types.
As per discussion on PATCH 1, I noticed the ACPI _DSM method detailed in
PCI Firmware Spec r3.2, 4.6.9 can provide individual delay values for five
different scenarios (Conventional Reset, DL_Up, FLR, D3hot to D0, VF Enable),
so we should probably store each of them in struct pci_dev.

> I'm a little wary of "lowering the global default post-reset timeout"
> because that's not safe in general.  For example, a hot-added device
> that is completely spec compliant regarding post-reset timing may not
> work correctly if we've lowered a global timeout.
> 

That makes sense. However, the timeout is currently 1 minute.
The only user of this value is pci_dev_wait(), which is itself
only invoked as part of various resets. Are there any scenarios
where that much time is truly needed after a device reset?





Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879



  reply	other threads:[~2020-02-24 18:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 12:20 [PATCH 0/3] Improve PCI device post-reset readiness polling Stanislav Spassov
2020-02-23 12:20 ` [PATCH 1/3] PCI: Make PCIE_RESET_READY_POLL_MS configurable Stanislav Spassov
2020-02-24 14:15   ` Bjorn Helgaas
2020-02-24 17:52     ` Spassov, Stanislav
2020-02-27 21:45       ` Bjorn Helgaas
2020-02-27 23:44         ` Sinan Kaya
2020-02-28  2:18           ` Raj, Ashok
2020-03-02 16:39             ` Sinan Kaya
2020-03-02 17:37               ` Raj, Ashok
2020-03-02 18:30                 ` Sinan Kaya
2020-02-23 12:20 ` [PATCH 2/3] PCI: Introduce per-device reset_ready_poll override Stanislav Spassov
2020-02-24 14:34   ` Bjorn Helgaas
2020-02-24 18:05     ` Spassov, Stanislav [this message]
2020-02-23 12:20 ` [PATCH 3/3] PCI: Add CRS handling to pci_dev_wait() Stanislav Spassov
2020-02-24 20:41   ` 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=52543631a871ba576b9711d5b6a3fad12019cece.camel@amazon.de \
    --to=stanspas@amazon.de \
    --cc=akpm@linux-foundation.org \
    --cc=alex.williamson@redhat.com \
    --cc=ashok.raj@intel.com \
    --cc=helgaas@kernel.org \
    --cc=jschoenh@amazon.de \
    --cc=linux-pci@vger.kernel.org \
    --cc=okaya@kernel.org \
    --cc=rajatja@google.com \
    --cc=tglx@linutronix.de \
    --cc=wawei@amazon.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;
as well as URLs for NNTP newsgroup(s).