Page MenuHomeFreeBSD

USB4 Pink Sardine controller support
AbandonedPublic

Authored by obiwac on Mar 22 2025, 1:36 AM.
Tags
Referenced Files
Unknown Object (File)
Wed, Oct 8, 9:07 PM
Unknown Object (File)
Thu, Oct 2, 9:25 PM
Unknown Object (File)
Thu, Oct 2, 8:26 AM
Unknown Object (File)
Thu, Oct 2, 8:25 AM
Unknown Object (File)
Wed, Oct 1, 6:59 PM
Unknown Object (File)
Mon, Sep 29, 5:22 PM
Unknown Object (File)
Mon, Sep 29, 5:22 PM
Unknown Object (File)
Mon, Sep 29, 5:21 PM
Subscribers

Details

Summary

Add support for the AMD Pink Sardine controller (1022:1668/9) and fix issue where we weren't getting interrupts for more than the first command sent on the ring (which presumably was not an issue for the hardware Scott was testing on).

I also added a couple comments as notes-to-self which I'll come back to.

Test Plan

Testing on AMD Pink Sardine controller (1022:1668/9), which is host interface version 1.0.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67361
Build 64244: arc lint + arc unit

Event Timeline

sys/dev/thunderbolt/nhi.c
1057

which standard?

1062

The question would be "does it work on all platforms" more than if it's strictly necessary on some. If this is right on all the we should so say. If there's some reason this isn't needed on all platforms that isn't some have it by default, we should document them if we can.

sys/dev/thunderbolt/tb_pcib.c
108

Will we need to add this for every bridge? Is there some way to look at something other than IDs to match this device?

sys/dev/thunderbolt/nhi.c
1057

USB4 spec, should I specifiy this here?

1062

It will work on all platforms as we don't actually use the interrupt status register and this just clears them. Its just that on Pink Sardine this register needs to be cleared and I'm not sure if this is the case on others. I'll change this comment.

sys/dev/thunderbolt/nhi.c
1057

Yes IMO we should have a reference. Something like "see USB4 V2 12.6.3.4.1" upon use here, and a reference somewhere in this file with the full title (something like Universal Serial Bus 4 (USB4) Specification, Version 2.0, September 2024)

sys/dev/thunderbolt/nhi.c
1057

Yea, have this at the top, if possible. We have some version skew in some drivers that started with, for example, nvme 1.2 and the section numbers have changed now that we're to 2.1. Having a URL at the top would be good too.

Accept all USB4 class PCI devices in nhi_pci_probe

sys/dev/thunderbolt/tb_pcib.c
108

Now looking at PCI class too, so all USB4 controllers are accepted

At that point, I wonder if this nhi_identifiers array even makes sense to keep or if it should just be removed

sys/dev/thunderbolt/tb_pcib.c
108

Probably removed, with entries only if we need quirks.

467

Can roll these typo fixes etc into the commit for D49450