Skip to content

Commit 7cd23f6

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI: Document the Capability accessor RMW improvements
Documentation claims port service drivers should play nice with respect to PCIe Capability changes, but the concurrency control is now provided in the Capability accessors as long as the correct ones are used. Update the documention to match the RMW accessor behavior. Link: https://lore.kernel.org/r/20230717120503.15276-12-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent f139492 commit 7cd23f6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Documentation/PCI/pciebus-howto.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,12 @@ PCI Config Registers
213213
--------------------
214214

215215
Each service driver runs its PCI config operations on its own
216-
capability structure except the PCI Express capability structure, in
217-
which Root Control register and Device Control register are shared
218-
between PME and AER. This patch assumes that all service drivers
219-
will be well behaved and not overwrite other service driver's
220-
configuration settings.
216+
capability structure except the PCI Express capability structure,
217+
that is shared between many drivers including the service drivers.
218+
RMW Capability accessors (pcie_capability_clear_and_set_word(),
219+
pcie_capability_set_word(), and pcie_capability_clear_word()) protect
220+
a selected set of PCI Express Capability Registers (Link Control
221+
Register and Root Control Register). Any change to those registers
222+
should be performed using RMW accessors to avoid problems due to
223+
concurrent updates. For the up-to-date list of protected registers,
224+
see pcie_capability_clear_and_set_word().

0 commit comments

Comments
 (0)