public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] PCI: Use Configuration RRS to wait for device ready
@ 2024-08-27 23:48 Bjorn Helgaas
  2024-08-27 23:48 ` [RFC PATCH 1/3] PCI: Wait for device readiness with Configuration RRS Bjorn Helgaas
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Bjorn Helgaas @ 2024-08-27 23:48 UTC (permalink / raw)
  To: linux-pci
  Cc: Ilpo Järvinen, Maciej W . Rozycki, Mika Westerberg,
	Lukas Wunner, Rafael J . Wysocki, Mario Limonciello, Duc Dang,
	Alex Williamson, linux-kernel, Bjorn Helgaas

From: Bjorn Helgaas <bhelgaas@google.com>

After a device reset, pci_dev_wait() waits for a device to become
completely ready by polling the PCI_COMMAND register.  The spec envisions
that software would instead poll for the device to stop responding to
config reads with Completions with Request Retry Status (RRS).

Polling PCI_COMMAND leads to hardware retries that are invisible to
software and the backoff between software retries doesn't work correctly.

Root Ports are not required to support the Configuration RRS Software
Visibility feature that prevents hardware retries and makes the RRS
Completions visible to software, so this series only uses it when available
and falls back to PCI_COMMAND polling when it's not.

This is completely untested and posted for comments.

Bjorn Helgaas (3):
  PCI: Wait for device readiness with Configuration RRS
  PCI: aardvark: Correct Configuration RRS checking
  PCI: Rename CRS Completion Status to RRS

 drivers/bcma/driver_pci_host.c             | 10 ++--
 drivers/pci/controller/dwc/pcie-tegra194.c | 18 +++---
 drivers/pci/controller/pci-aardvark.c      | 64 +++++++++++-----------
 drivers/pci/controller/pci-xgene.c         |  6 +-
 drivers/pci/controller/pcie-iproc.c        | 18 +++---
 drivers/pci/pci-bridge-emul.c              |  4 +-
 drivers/pci/pci.c                          | 41 +++++++++-----
 drivers/pci/pci.h                          | 11 +++-
 drivers/pci/probe.c                        | 33 +++++------
 include/linux/bcma/bcma_driver_pci.h       |  2 +-
 include/linux/pci.h                        |  1 +
 include/uapi/linux/pci_regs.h              |  6 +-
 12 files changed, 117 insertions(+), 97 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-09-11  0:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox