mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] PCI: endpoint: Skip upper halves of 64-bit BARs during search
@ 2026-11-02 11:23 Manikanta Maddireddy
  2026-11-02 11:23 ` [PATCH v2 1/2] " Manikanta Maddireddy
  2026-11-02 11:23 ` [PATCH v2 2/2] PCI: endpoint: Clarify only_64bit for reserved BARs Manikanta Maddireddy
  0 siblings, 2 replies; 6+ messages in thread
From: Manikanta Maddireddy @ 2026-11-02 11:23 UTC (permalink / raw)
  To: mani, kwilczynski, linux-pci
  Cc: kishon, Frank.Li, bhelgaas, cassel, den, thierry.reding,
	jonathanh, vidyas, linux-tegra, linux-kernel, mmaddireddy

pci_epc_get_next_free_bar() can return the upper half of a reserved or
disabled 64-bit BAR when the search passes that BAR. On Tegra, this can
cause the EPF test driver to attempt to program BAR3 and BAR5 even though
they are the upper halves of reserved BAR2 and BAR4.

Patch 1 checks the preceding descriptor for every candidate so that upper
halves are skipped throughout the search. Patch 2 clarifies that only_64bit
also describes the hardware width of a BAR_RESERVED and that the following
BAR register cannot be used independently. The existing wording for BAR
configuration by EPF drivers is retained.

Changes in v2:
- Rebase onto the current PCI main-based patch stack.
- Add a Fixes tag referencing 27ce1d8ecb9b ("PCI: endpoint: Allow only_64bit
  on BAR_RESERVED") to patch 1. The code change is unchanged from v1.
- Add patch 2 to clarify only_64bit for BAR_RESERVED, following Niklas
  Cassel's review.
- Add a cover letter now that the series contains two patches.

v1: https://lore.kernel.org/linux-pci/20261021080644.1346549-1-mmaddireddy@nvidia.com/

Manikanta Maddireddy (2):
  PCI: endpoint: Skip upper halves of 64-bit BARs during search
  PCI: endpoint: Clarify only_64bit for reserved BARs

 drivers/pci/endpoint/pci-epc-core.c | 8 ++++----
 include/linux/pci-epc.h             | 5 +++++
 2 files changed, 9 insertions(+), 4 deletions(-)


base-commit: e04b12478ada488e59c54bf17dee4e0f5843e131
-- 
2.34.1


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

end of thread, other threads:[~2026-11-02 16:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 11:23 [PATCH v2 0/2] PCI: endpoint: Skip upper halves of 64-bit BARs during search Manikanta Maddireddy
2026-11-02 11:23 ` [PATCH v2 1/2] " Manikanta Maddireddy
2026-11-02 15:12   ` Niklas Cassel
2026-11-02 16:03   ` Frank Li
2026-11-02 11:23 ` [PATCH v2 2/2] PCI: endpoint: Clarify only_64bit for reserved BARs Manikanta Maddireddy
2026-11-02 15:12   ` Niklas Cassel

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

all inboxes | Powered by JetHome®