All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: David Laight <David.Laight@ACULAB.COM>,
	'Amey Narkhede' <ameynarkhede03@gmail.com>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"helgaas@kernel.org" <helgaas@kernel.org>,
	"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
	"kabel@kernel.org" <kabel@kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"raphael.norwitz@nutanix.com" <raphael.norwitz@nutanix.com>
Subject: Re: How long should be PCIe card in Warm Reset state?
Date: Tue, 30 Mar 2021 15:10:18 +0200	[thread overview]
Message-ID: <20210330131018.gby4ze3u6mii23ls@pali> (raw)
In-Reply-To: <alpine.DEB.2.21.2103301428030.18977@angie.orcam.me.uk>

On Tuesday 30 March 2021 15:04:02 Maciej W. Rozycki wrote:
> On Thu, 25 Mar 2021, David Laight wrote:
> 
> > I can't see the value in the (nice bound) copy of the PCI 2.0 spec I have.
> > But IIRC it is 100ms (it might just me 500ms).
> > While this might seem like ages it can be problematic if targets have
> > to load large FPGA images from serial EEPROMs.
> 
>  AFAICT it is 100ms for the Conventional Reset before Configuration 
> Requests are allowed to be issued in the first place, and then they are 
> allowed to fail with the Configuration Request Retry Status (CRS) status 
> until the device is ready to respond.  Then it is 1.0s before the Root 
> Complex and/or system software is allowed to consider a device broken that 
> does not return a Successful Completion status for a valid Configuration 
> Request.
> 
>  This 1.0s period is analogous to the Trhfa parameter for PCI/PCI-X buses 
> (2^25/2^27 bus clocks respectively; I don't know why the PCIe spec quotes 
> the latter value as 2^26, contrary to what the original PCI-X spec says, 
> but obviously the latter document is what sets the norm), which also has 
> to be respected for the respective bus segments in the presence of PCIe to 
> PCI/PCI-X bridges.

Hello Maciej! Thank you for information.

>  For Function-level reset the timeout is 100ms.
> 
>  This is specified in sections 6.6.1. "Conventional Reset" and 6.6.2. 
> "Function-Level Reset (FLR)" respectively in the copy of PCIe 2.0 base 
> spec I have access to; I imagine other versions may have different section 
> numbers, but will have them named similarly.
> 
>  If I were to implement this stuff, for good measure I'd give it a safety 
> margin beyond what the spec requires and use a timeout of say 2-4s while 
> actively querying the status of the device.  The values given in the spec 
> are only the minimum requirements.

Are you able to also figure out what is the minimal timeout value for PCIe Warm Reset?

Because we are having troubles to "decode" correct minimal timeout value
for this PCIe Warm Reset (not Function-level reset).

  reply	other threads:[~2021-03-30 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 11:05 How long should be PCIe card in Warm Reset state? Pali Rohár
2021-03-23 16:19 ` Amey Narkhede
2021-03-23 16:27   ` Pali Rohár
2021-03-23 16:57     ` Amey Narkhede
2021-03-25  9:18       ` David Laight
2021-03-30 13:04         ` Maciej W. Rozycki
2021-03-30 13:10           ` Pali Rohár [this message]
2021-03-30 14:34             ` Maciej W. Rozycki
2021-03-30 15:04               ` Pali Rohár
2021-03-30 15:22                 ` Maciej W. Rozycki
2021-04-25 15:39           ` Pali Rohár

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=20210330131018.gby4ze3u6mii23ls@pali \
    --to=pali@kernel.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=alex.williamson@redhat.com \
    --cc=ameynarkhede03@gmail.com \
    --cc=helgaas@kernel.org \
    --cc=kabel@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=macro@orcam.me.uk \
    --cc=raphael.norwitz@nutanix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.