From: Lukas Wunner <lukas@wunner.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Maciej W . Rozycki" <macro@orcam.me.uk>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
"Mario Limonciello" <mario.limonciello@amd.com>,
"Duc Dang" <ducdang@google.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
linux-kernel@vger.kernel.org,
"Bjorn Helgaas" <bhelgaas@google.com>
Subject: Re: [RFC PATCH 1/3] PCI: Wait for device readiness with Configuration RRS
Date: Wed, 28 Aug 2024 06:17:04 +0200 [thread overview]
Message-ID: <Zs6kwHX7EIGvnf9_@wunner.de> (raw)
In-Reply-To: <20240827234848.4429-2-helgaas@kernel.org>
On Tue, Aug 27, 2024 at 06:48:46PM -0500, Bjorn Helgaas wrote:
> @@ -1311,9 +1320,15 @@ static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)
> return -ENOTTY;
> }
>
> - pci_read_config_dword(dev, PCI_COMMAND, &id);
> - if (!PCI_POSSIBLE_ERROR(id))
> - break;
> + if (root && root->config_crs_sv) {
> + pci_read_config_dword(dev, PCI_VENDOR_ID, &id);
> + if (!pci_bus_crs_vendor_id(id))
> + break;
There was an effort from Amazon back in 2020/2021 to improve CRS support:
https://lore.kernel.org/linux-pci/20200307172044.29645-1-stanspas@amazon.com/
One suggestion you raised in the subsequent discussion was to use a
16-bit (word) instead of a 32-bit (dword) read of the Vendor ID
register to avoid issues with devices that don't implement CRS SV
correctly:
https://lore.kernel.org/linux-pci/20210913160745.GA1329939@bjorn-Precision-5520/
I realize that pci_bus_crs_vendor_id() masks the Device ID bits,
so probably no biggie. Just want to make sure all lessons learned
during previous discussions on this topic are considered. :)
Thanks,
Lukas
next prev parent reply other threads:[~2024-08-28 4:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-27 23:48 [RFC PATCH 0/3] PCI: Use Configuration RRS to wait for device ready Bjorn Helgaas
2024-08-27 23:48 ` [RFC PATCH 1/3] PCI: Wait for device readiness with Configuration RRS Bjorn Helgaas
2024-08-28 4:17 ` Lukas Wunner [this message]
2024-08-28 20:53 ` Bjorn Helgaas
2024-09-11 0:42 ` Duc Dang
2024-08-27 23:48 ` [RFC PATCH 2/3] PCI: aardvark: Correct Configuration RRS checking Bjorn Helgaas
2024-08-27 23:48 ` [RFC PATCH 3/3] PCI: Rename CRS Completion Status to RRS Bjorn Helgaas
2024-08-28 21:24 ` [RFC PATCH 0/3] PCI: Use Configuration RRS to wait for device ready Mario Limonciello
2024-08-28 21:42 ` Bjorn Helgaas
2024-08-28 22:26 ` Mario Limonciello
2024-08-29 23:12 ` Bjorn Helgaas
2024-09-10 0:59 ` Bjorn Helgaas
2024-09-10 22:55 ` 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=Zs6kwHX7EIGvnf9_@wunner.de \
--to=lukas@wunner.de \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=ducdang@google.com \
--cc=helgaas@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=macro@orcam.me.uk \
--cc=mario.limonciello@amd.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael.j.wysocki@intel.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.