[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zs6kwHX7EIGvnf9_@wunner.de>
Date: Wed, 28 Aug 2024 06:17:04 +0200
From: Lukas Wunner <lukas@...ner.de>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: linux-pci@...r.kernel.org,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
"Maciej W . Rozycki" <macro@...am.me.uk>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Mario Limonciello <mario.limonciello@....com>,
Duc Dang <ducdang@...gle.com>,
Alex Williamson <alex.williamson@...hat.com>,
linux-kernel@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [RFC PATCH 1/3] PCI: Wait for device readiness with
Configuration RRS
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
Powered by blists - more mailing lists