Page MenuHomeFreeBSD

Add accessor methods to fetch the BAR holding the MSI-X table and PBA.
ClosedPublic

Authored by jhb on Dec 22 2015, 8:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 5:35 PM
Unknown Object (File)
Tue, Apr 16, 7:28 PM
Unknown Object (File)
Tue, Apr 16, 6:24 PM
Unknown Object (File)
Tue, Apr 16, 4:42 PM
Unknown Object (File)
Tue, Apr 16, 12:24 PM
Unknown Object (File)
Tue, Apr 16, 11:55 AM
Unknown Object (File)
Mar 11 2024, 8:12 AM
Unknown Object (File)
Feb 1 2024, 2:42 PM
Subscribers

Details

Summary

Add accessor methods to fetch the BAR holding the MSI-X table and PBA.

While here, explicitly note the requirement that the BAR(s) must be
allocated prior to calling pci_alloc_msix().

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 accessor methods to fetch the BAR holding the MSI-X table and PBA..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added reviewers: emaste, andrew.

I haven't tested this yet, but this is the general idea. Hopefully it compiles. :-P

LGTM but I'll wait on @andrew to give it a try

share/man/man9/pci.9
711 ↗(On Diff #11616)

seems strange to read negative one not -1 (although it fits in with the context here)

share/man/man9/pci.9
711 ↗(On Diff #11616)

Yeah, I was torn writing it. I think it's because I was taught to always spell out single digit numbers in English and only resort to numerals for larger values. However, we use -1 in other manpages so I will change it.

jhb edited edge metadata.
  • Add accessor methods to fetch the BAR holding the MSI-X table and PBA.
  • Use -1 instead of "negative one".
emaste edited edge metadata.
emaste added inline comments.
share/man/man9/pci.9
711 ↗(On Diff #11618)

Yeah, for standard prose that's a useful style guide rule, but IMHO when we're referring explicitly to an argument or return value it should use numerals. For example These three functions return 0, 1 or -1.

This revision is now accepted and ready to land.Dec 22 2015, 10:00 PM
andrew edited edge metadata.

You may wish to point out the value returned can be used as the resource id when mapping the configuration space. That was the only thing that tripped me up adding this to the xhci driver.

This revision was automatically updated to reflect the committed changes.