Page MenuHomeFreeBSD

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

Authored by obiwac_gmail.com on Mar 22 2025, 1:45 AM.
Tags
Referenced Files
Unknown Object (File)
Sun, Jun 8, 5:39 PM
Unknown Object (File)
Sat, Jun 7, 7:51 AM
Unknown Object (File)
Sun, Jun 1, 12:39 PM
Unknown Object (File)
Sun, Jun 1, 10:28 AM
Unknown Object (File)
Thu, May 22, 10:47 PM
Unknown Object (File)
May 15 2025, 3:46 AM
Unknown Object (File)
Apr 12 2025, 3:33 AM
Unknown Object (File)
Apr 5 2025, 5:27 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.