Skip to content

Fix hardcoded PCI domain - #1056

Merged
rdementi merged 1 commit into
intel:masterfrom
DdhD:fix/hardcoded-PCI-domain
Oct 7, 2026
Merged

rdementi merged 1 commit into
intel:masterfrom
DdhD:fix/hardcoded-PCI-domain

Conversation

@DdhD

@DdhD DdhD commented Oct 6, 2026

Copy link
Copy Markdown

Summary

Use p->bdf.domainno instead of hardcoded PCI domain 0 when
constructing PciHandleType in probe_capability_pci_express().

This preserves the device's complete PCI address and makes capability
probing consistent with probe_pci(), which already uses the actual
PCI domain.

Problem

On my dual-socket Intel Xeon 6746E (Sierra Forest) Linux system,
an Ethernet controller exists at 0001:60:00.0, while
0000:60:00.0 does not exist.

PCM discovers the device in domain 0001, but the hardcoded domain
causes capability probing to access 0000:60:00.0 instead.
As a result, pcm-iio exits with:

PCM ERROR. Exception PCM error: can't open PciHandle 0:96:0:0

Validation

I tested this one-line change locally on the affected system.

Before the change, sudo ./pcm-iio 1 failed with the exception above.
After applying the change and rebuilding, pcm-iio ran successfully
without that exception.

This validates the fix for the reported device-discovery failure,
not the accuracy of the bandwidth measurements.

Fixes #1055

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 0 with 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
rdementi merged commit d03a3b6 into intel:master Oct 7, 2026
28 checks passed
@DdhD
DdhD deleted the fix/hardcoded-PCI-domain branch October 7, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pcm-iio: hardcoded PCI domain 0 in probe_capability_pci_express() causes failure on multi-domain systems

3 participants