Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v3 0/8] PCI: Replace short msleep() calls with more precise delay functions
@ 2025-08-26 17:03 Hans Zhang
  2025-08-26 17:03 ` [PATCH v3 1/8] PCI: Add macro for secondary bus reset delay Hans Zhang
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Hans Zhang @ 2025-08-26 17:03 UTC (permalink / raw)
  To: bhelgaas, helgaas, linux-pci, linux-kernel; +Cc: Hans Zhang

This series improves code readability and maintainability in the PCI
subsystem by replacing hard-coded delay values with descriptive macros.

The changes include:
- Adding macros for various delay values used in PCI operations
- Replacing msleep(2) with fsleep(2000) for precise secondary bus reset
- Keeping the same delay values but using macros for better documentation

These changes make the code easier to understand and maintain, while
ensuring that the timing requirements specified in the PCIe r7.0
specification are met.

---
Changes for v3:
https://patchwork.kernel.org/project/linux-pci/cover/20250822155908.625553-1-18255117159@163.com/

- According to Bjorn's suggestion, split the first patch of v2 and add
  macro definitions to the remaining patches.

Changes for v2:
https://patchwork.kernel.org/project/linux-pci/patch/20250820160944.489061-1-18255117159@163.com/

- According to the Maintainer's suggestion, it was modified to fsleep,
  usleep_range, and macro definitions were used instead of hard code. (Bjorn)
---
Hans Zhang (8):
  PCI: Add macro for secondary bus reset delay
  PCI: Replace msleep with fsleep for precise secondary bus reset
  PCI: Add macro for link status check delay
  PCI: rcar-host: Add macro for speed change monitoring delay
  PCI: brcmstb: Add macro for link up check delay
  PCI: rcar: Add macro for PHY ready check delay
  PCI: pciehp: Add macros for hotplug operation delays
  PCI/DPC: Add macro for RP busy check delay

 drivers/pci/controller/pcie-brcmstb.c   |  4 +++-
 drivers/pci/controller/pcie-rcar-host.c |  4 +++-
 drivers/pci/controller/pcie-rcar.c      |  4 +++-
 drivers/pci/hotplug/pciehp_hpc.c        |  7 +++++--
 drivers/pci/pci.c                       | 11 +++++------
 drivers/pci/pci.h                       |  3 +++
 drivers/pci/pcie/dpc.c                  |  4 +++-
 7 files changed, 25 insertions(+), 12 deletions(-)


base-commit: fab1beda7597fac1cecc01707d55eadb6bbe773c
-- 
2.25.1


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

end of thread, other threads:[~2025-09-08  6:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26 17:03 [PATCH v3 0/8] PCI: Replace short msleep() calls with more precise delay functions Hans Zhang
2025-08-26 17:03 ` [PATCH v3 1/8] PCI: Add macro for secondary bus reset delay Hans Zhang
2025-08-26 17:03 ` [PATCH v3 2/8] PCI: Replace msleep with fsleep for precise secondary bus reset Hans Zhang
2025-08-26 23:05   ` Bjorn Helgaas
2025-08-28 14:25     ` Hans Zhang
2025-08-26 17:03 ` [PATCH v3 3/8] PCI: Add macro for link status check delay Hans Zhang
2025-08-26 17:03 ` [PATCH v3 4/8] PCI: rcar-host: Add macro for speed change monitoring delay Hans Zhang
2025-08-26 17:03 ` [PATCH v3 5/8] PCI: brcmstb: Add macro for link up check delay Hans Zhang
2025-08-26 17:03 ` [PATCH v3 6/8] PCI: rcar: Add macro for PHY ready " Hans Zhang
2025-08-26 17:03 ` [PATCH v3 7/8] PCI: pciehp: Add macros for hotplug operation delays Hans Zhang
2025-08-26 17:03 ` [PATCH v3 8/8] PCI/DPC: Add macro for RP busy check delay Hans Zhang
2025-09-08  6:25 ` [PATCH v3 0/8] PCI: Replace short msleep() calls with more precise delay functions Manivannan Sadhasivam

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