mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manikanta Maddireddy <mmaddireddy@nvidia.com>
To: <mani@kernel.org>, <kwilczynski@kernel.org>, <linux-pci@vger.kernel.org>
Cc: <kishon@kernel.org>, <Frank.Li@kernel.org>, <bhelgaas@google.com>,
	<cassel@kernel.org>, <den@valinux.co.jp>,
	<thierry.reding@kernel.org>, <jonathanh@nvidia.com>,
	<vidyas@nvidia.com>, <linux-tegra@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <mmaddireddy@nvidia.com>
Subject: [PATCH v2 0/2] PCI: endpoint: Skip upper halves of 64-bit BARs during search
Date: Mon, 2 Nov 2026 16:53:04 +0530	[thread overview]
Message-ID: <20261102112306.4018464-1-mmaddireddy@nvidia.com> (raw)

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


             reply	other threads:[~2026-11-02 11:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 11:23 Manikanta Maddireddy [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261102112306.4018464-1-mmaddireddy@nvidia.com \
    --to=mmaddireddy@nvidia.com \
    --cc=Frank.Li@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=den@valinux.co.jp \
    --cc=jonathanh@nvidia.com \
    --cc=kishon@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=thierry.reding@kernel.org \
    --cc=vidyas@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®