Re: [PATCH 3/5] PCI: Add pcie_capability_user_read_{word,dword}()
From: Keith Busch
Date: Mon Oct 26 2026 - 11:23:18 EST
On Sat, Oct 24, 2026 at 05:08:31PM -0700, Matthew Wood wrote:
> pcie_capability_read_word() and pcie_capability_read_dword() use the
> kernel config accessors which don't check block_cfg_access, so they
> can't be used for reads on behalf of userspace that should wait for a
> reset (or other pci_cfg_access_lock() holder) to finish.
>
> Add pcie_capability_user_read_word() and
> pcie_capability_user_read_dword() helpers, which provide the same function
> using the user config accessors.
>
> These are for use within the PCI core, so they are declared in
> drivers/pci/pci.h and not exported.
Looks good.
Reviewed-by: Keith Busch <kbusch@xxxxxxxxxx>