Page MenuHomeFreeBSD

Add helper methods for PCI-e register access.
ClosedPublic

Authored by jhb on Nov 5 2015, 8:19 PM.
Tags
None
Referenced Files
F105993333: D4088.diff
Mon, Dec 23, 2:57 PM
Unknown Object (File)
Sat, Dec 21, 1:52 PM
Unknown Object (File)
Nov 20 2024, 3:20 PM
Unknown Object (File)
Nov 8 2024, 4:24 AM
Unknown Object (File)
Oct 30 2024, 6:26 AM
Unknown Object (File)
Oct 4 2024, 11:29 PM
Unknown Object (File)
Oct 3 2024, 10:30 PM
Unknown Object (File)
Oct 3 2024, 3:10 AM
Subscribers
None

Details

Summary

Add helper routines for PCI device drivers to read, write, and modify
PCI-Express capability registers (that is, PCI config registers in the
standard PCI config space belonging to the PCI-Express capability
register set).

Note that all of the current PCI-e registers are either 16 or 32-bits,
so only widths of 2 or 4 bytes are supported.

Also, there is not an existing pci_adjust_config() similar to
pcie_adjust_config(). I could add that in a separate commit if it
would be useful.

Test Plan
  • I use these in a pending change to cxgbe(4), however these are generally useful. We can probably remove some duplicated code in various drivers that uses pci_find_cap() followed by raw pci_read/write_config.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Add helper methods for PCI-e register access..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: imp.

This looks fine to me.

This revision was automatically updated to reflect the committed changes.