Repository navigation
Fix hardcoded PCI domain - #1056
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused change correctly fixes multi-domain PCI capability access without affecting domain-zero devices.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes #1055 by preserving the PCI domain during PCIe capability probing.
Changes:
- Replaces hardcoded domain
0with the device’s actual domain. - Aligns capability probing with
probe_pci().
| File | Description |
|---|---|
src/lspci.cpp |
Uses the complete PCI address when opening the device. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
rdementi
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use
p->bdf.domainnoinstead of hardcoded PCI domain0whenconstructing
PciHandleTypeinprobe_capability_pci_express().This preserves the device's complete PCI address and makes capability
probing consistent with
probe_pci(), which already uses the actualPCI domain.
Problem
On my dual-socket Intel Xeon 6746E (Sierra Forest) Linux system,
an Ethernet controller exists at
0001:60:00.0, while0000:60:00.0does not exist.PCM discovers the device in domain
0001, but the hardcoded domaincauses capability probing to access
0000:60:00.0instead.As a result,
pcm-iioexits with:Validation
I tested this one-line change locally on the affected system.
Before the change,
sudo ./pcm-iio 1failed with the exception above.After applying the change and rebuilding,
pcm-iioran successfullywithout that exception.
This validates the fix for the reported device-discovery failure,
not the accuracy of the bandwidth measurements.
Fixes #1055