Skip to content
Commit 8f3b7103 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Leon Romanovsky
Browse files

RDMA/hfi1: Use RMW accessors for changing LNKCTL2



Convert open coded RMW accesses for LNKCTL2 to use
pcie_capability_clear_and_set_word() which makes its easier to
understand what the code tries to do.

In addition, this futureproofs the code. LNKCTL2 is not really owned by
any driver because it is a collection of control bits that PCI core
might need to touch. RMW accessors already have support for proper
locking for a selected set of registers to avoid losing concurrent
updates (LNKCTL2 is not yet among the registers that need protection
but likely will be in the future).

Suggested-by: default avatarLukas Wunner <lukas@wunner.de>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240503133640.15899-1-ilpo.jarvinen@linux.intel.com


Reviewed-by: default avatarDean Luick <dean.luick@cornelisnetworks.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 44b607ad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment