From: Keith Busch <keith.busch@intel.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Sinan Kaya <okaya@codeaurora.org>,
linux-pci@vger.kernel.org, timur@codeaurora.org,
alex.williamson@redhat.com, vikrams@codeaurora.org,
Lorenzo.Pieralisi@arm.com, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH V4] PCI: handle CRS returned by device after FLR
Date: Thu, 13 Jul 2017 12:03:45 -0400 [thread overview]
Message-ID: <20170713160345.GG8388@localhost.localdomain> (raw)
In-Reply-To: <20170713121758.GL4486@bhelgaas-glaptop.roam.corp.google.com>
On Thu, Jul 13, 2017 at 07:17:58AM -0500, Bjorn Helgaas wrote:
> On Thu, Jul 06, 2017 at 05:07:14PM -0400, Sinan Kaya wrote:
> > An endpoint is allowed to issue Configuration Request Retry Status (CRS)
> > following a Function Level Reset (FLR) request to indicate that it is not
> > ready to accept new requests.
> >
> > Seen a timeout message with Intel 750 NVMe drive and FLR reset.
> >
> > Kernel enables CRS visibility in pci_enable_crs() function for each bridge
> > it discovers. The OS observes a special vendor ID read value of 0xFFFF0001
> > in this case. We need to keep polling until this special read value
> > disappears. pci_bus_read_dev_vendor_id() takes care of CRS handling for a
> > given vendor id read request under the covers.
> >
> > Adding a vendor ID read if this is a physical function before attempting
> > to read any other registers on the endpoint. A CRS indication will only
> > be given if the address to be read is vendor ID register.
> >
> > Note that virtual functions report their vendor ID through another
> > mechanism.
> >
> > The spec is calling to wait up to 1 seconds if the device is sending CRS.
> > The NVMe device seems to be requiring more. Relax this up to 60 seconds.
>
> Can you add a pointer to the "1 second" requirement in the spec here?
> We use 60 seconds in pci_scan_device() and acpiphp_add_context(). Is
> there a basis in the spec for the 60 second timeout?
I also don't see anywhere that says CRS is limited to only 1 second. It
looks to me that the spec allows a device to return CRS for as long as it
takes to complete initialization.
>From PCIe Base Spec, Section 2.3.1 CRS Implementation note:
A device in receipt of a Configuration Request following a valid reset
condition may respond with a CRS Completion Status to terminate the
Request, and thus effectively stall the Configuration Request until
such time that the subsystem has completed local initialization and
is ready to communicate with the host.
No time limit specified here, or anywhere else for that matter AFAICT.
Where is 1 second requirement coming from?
next prev parent reply other threads:[~2017-07-13 15:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 21:07 [PATCH V4] PCI: handle CRS returned by device after FLR Sinan Kaya
2017-07-13 12:17 ` Bjorn Helgaas
2017-07-13 15:44 ` Sinan Kaya
2017-07-13 16:29 ` Keith Busch
2017-07-13 16:42 ` Sinan Kaya
2017-07-13 17:24 ` Keith Busch
2017-07-13 23:38 ` Bjorn Helgaas
2017-07-14 14:10 ` Sinan Kaya
2017-07-13 16:03 ` Keith Busch [this message]
2017-07-13 23:49 ` Bjorn Helgaas
2017-07-14 14:28 ` Sinan Kaya
2017-07-31 21:45 ` Sinan Kaya
2017-07-31 22:19 ` 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=20170713160345.GG8388@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=Lorenzo.Pieralisi@arm.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=okaya@codeaurora.org \
--cc=timur@codeaurora.org \
--cc=vikrams@codeaurora.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