Skip to content

[linux-nvidia-6.18-next] PCI: mirror PI7C9X3G606GPC Port 4 BAR0#447

Draft
nirmoy wants to merge 1 commit into
NVIDIA:linux-nvidia-6.18-nextfrom
nirmoy:codex/pericom-msix-bar-war-6.18
Draft

[linux-nvidia-6.18-next] PCI: mirror PI7C9X3G606GPC Port 4 BAR0#447
nirmoy wants to merge 1 commit into
NVIDIA:linux-nvidia-6.18-nextfrom
nirmoy:codex/pericom-msix-bar-war-6.18

Conversation

@nirmoy
Copy link
Copy Markdown
Collaborator

@nirmoy nirmoy commented May 28, 2026

Summary

  • Backport the PI7C9X3G606GPC Port 4 BAR0 workaround from the 6.17 PR.
  • Add a PCI final/resume quirk to mirror the upstream BAR0 value into downstream Port 4 BAR0.
  • Scope the WAR to the Diodes-confirmed OS-visible Tile0/P4 mapping: upstream bus + 1, device 04, function 0.
  • Port 4 BAR0 may read back as zero through normal PCI config space even after a successful write, so the quirk rewrites BAR0 whenever it runs.

Validation

  • Cherry-pick from the 6.17 PR applied cleanly to linux-nvidia-6.18-next.
  • git show --check and git diff --check passed.
  • Expected dmesg when the WAR runs:
pci 0002:a2:04.0: wrote upstream BAR 0 0x10c00000 to Port 4 BAR 0 for PI7C9X3G606GPC workaround
  • The BAR value is platform/boot dependent. In the 6.17 Quark test run, Linux reassigned upstream BAR0 for 0002:a1:00.0 from 0x10300000 to 0x10c00000, then the quirk wrote 0x10c00000 to 0002:a2:04.0 Port 4 BAR0.
  • pm_test=devices and pm_test=platform on the 6.17 test kernel both exercised the PCI resume path and produced the expected quirk log again after resume.
  • Normal config-space readback of Port 4 BAR0 still returns 0 on this device, so setpci readback is not a valid failure signal for the WAR.
  • A Diodes-provided BMC/I2C debug readback sequence returned non-zero Port 4 BAR0 bytes, 0x10 0xc0 0x00 0x00, matching 0x10c00000. That sequence uses special CPED/CDEP programming and is not a supported production validation path on this platform, so further validation should avoid it.

Fresh 6.18 package/boot validation is still pending.

References

Launchpad: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-6.17/+bug/2154457

6.17 PR: #442
BOS PR: #443
NVBug: https://nvbugspro.nvidia.com/bug/6205517
NVBug: https://nvbugspro.nvidia.com/bug/6134331

Some Pericom/Diodes PI7C9X3G606GPC switches require downstream Port 4
BAR0 to mirror the upstream port BAR0. Firmware may apply this during
boot, but Linux PCI resource assignment can move the upstream BAR0 and
leave Port 4 without the required mirror.

Add a final and resume quirk for downstream Port 4. The quirk verifies
that the immediate upstream bridge is the same switch, then writes Port 4
BAR0 from the upstream BAR0 after resource assignment and after resume.
Port 4 BAR0 may read back as zero even after a successful write, so the
write must be validated by platform-specific means.

Change-Id: I0a4665020b86e776c828d08eecc596870b3eeef8
Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
(cherry picked from commit 5edb468)
@nirmoy nirmoy added the help wanted Extra attention is needed label May 28, 2026
@nirmoy
Copy link
Copy Markdown
Collaborator Author

nirmoy commented May 28, 2026

Boro review

Latest watcher review: open review

Head: 37345cd0d2e1

This comment is maintained by nv-pr-bot. It is updated when the GitHub watcher publishes a newer review.

@nirmoy nirmoy removed the help wanted Extra attention is needed label May 28, 2026
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.

1 participant