Skip to content

RFC PCI: Use Configuration RRS to wait for device ready

Bjorn Helgaas linux-pci lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3PCI: Wait for device readiness with Configuration RRSdrivers/pci/pci.c drivers/pci/pci.h drivers/pci/probe.c +1 more+37 -193 replies
2/3PCI: aardvark: Correct Configuration RRS checkingdrivers/pci/controller/pci-aardvark.c+4 -40 replies
3/3PCI: Rename CRS Completion Status to RRSdrivers/bcma/driver_pci_host.c drivers/pci/controller/dwc/pcie-tegra194.c drivers/pci/controller/pci-aardvark.c +9 more+86 -840 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchDuc Dang
1/3T-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/3] PCI: Use Configuration RRS to wait for device ready

From: Bjorn Helgaas <[email protected]>

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(-)
Signature · 1 line
2.34.1