Page MenuHomeFreeBSD

USB4 host reset (& writing to router config space)
Needs ReviewPublic

Authored by obiwac on Mar 22 2025, 1:45 AM.
Tags
Referenced Files
F132459768: D49452.id154524.diff
Fri, Oct 17, 3:01 AM
Unknown Object (File)
Mon, Oct 13, 8:23 AM
Unknown Object (File)
Sun, Sep 28, 11:05 AM
Unknown Object (File)
Sun, Sep 28, 6:14 AM
Unknown Object (File)
Sun, Sep 21, 12:48 PM
Unknown Object (File)
Sun, Sep 21, 8:32 AM
Unknown Object (File)
Sun, Sep 21, 3:52 AM
Unknown Object (File)
Sep 15 2025, 8:45 AM
Subscribers

Details

Summary

Get host interface version (either 1.0 or 2.0) and reset accordingly.

This required support for writing to router config space.

Test Plan

Tested on AMD Pink Sardine controller (1022:1668/9), which is host interface version 1.0. It would be nice to try this out on version 2.0, but unfortunately I don't have the hardware to do this as it is fairly new.

This does require the D49451 patch to work on Pink Sardine.

Diff Detail

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

Event Timeline

sys/dev/thunderbolt/nhi.c
298

Why not NHI_SLPR_WAIT_US? C_HARDCLOCK? Why?

sys/dev/thunderbolt/nhi.c
298

NHI_SLPR_WAIT_US is for the time between us setting SLP and the router setting SLPR. This is the same number but a different value defined elsewhere in the spec. Including these constants in this patch is a mistake, they're not used. Will remove.

As for C_HARDCLOCK, I don't know, I had copied this line from another driver assuming it was the same. Will learn about this.