Commit 8f3b710
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: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240503133640.15899-1-ilpo.jarvinen@linux.intel.com
Reviewed-by: Dean Luick <dean.luick@cornelisnetworks.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>1 parent 44b607a commit 8f3b710
1 file changed
+8
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1207 | 1207 | | |
1208 | 1208 | | |
1209 | 1209 | | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1216 | 1213 | | |
1217 | | - | |
| 1214 | + | |
1218 | 1215 | | |
1219 | 1216 | | |
1220 | 1217 | | |
| |||
1223 | 1220 | | |
1224 | 1221 | | |
1225 | 1222 | | |
1226 | | - | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
1227 | 1226 | | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
| 1227 | + | |
1242 | 1228 | | |
1243 | 1229 | | |
1244 | 1230 | | |
| |||
0 commit comments