Page MenuHomeFreeBSD

thunderbolt: NHI resume routine
Needs ReviewPublic

Authored by obiwac on Fri, Oct 9, 5:52 PM.
Tags
None
Referenced Files
F176533539: D60540.id189271.diff
Mon, Oct 19, 3:17 PM
Unknown Object (File)
Sun, Oct 18, 9:21 PM
Unknown Object (File)
Sun, Oct 18, 1:43 AM
Unknown Object (File)
Fri, Oct 16, 10:20 AM
Unknown Object (File)
Thu, Oct 15, 5:40 PM
Unknown Object (File)
Thu, Oct 15, 12:15 PM
Unknown Object (File)
Wed, Oct 14, 11:39 AM
Unknown Object (File)
Tue, Oct 13, 9:14 AM
Subscribers

Details

Reviewers
imp
ngie
emaste
Summary

This is meant as a stopgap solution to recreate the ring state on resume
such that we can re-suspend USB4 controllers.

Currently, these rings fill up as we are not correctly acknowledging
hotplug events, so the only way to re-suspend was to unload and reload
the tb kernel module. This is necessary for entry to deeper S0ix states
on some platforms.

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

obiwac requested review of this revision.Fri, Oct 9, 5:52 PM
sys/dev/thunderbolt/nhi.c
414–418

How are upper layers, e.g., network layers, storage layers, etc, notified that their transmit/receives need to be requeued? Is this something that the hardware (NHI router) is expected to handle transparently, or is this something that needs to be handled by the thunderbolt(4) driver?
How does the thunderbolt(4) driver also tell consumers/producers that it's not routing any additional traffic after this function is called?

sys/dev/thunderbolt/router.c
433

Should this return an error?

sys/dev/thunderbolt/nhi.c
414–418

With respect to this comment...

How does the thunderbolt(4) driver also tell consumers/producers that it's not routing any additional traffic after this function is called?

... I remember from my embedded systems classes that sometimes drivers need to have specific registers programmed in order to tell the hardware to refuse any new messages. This is what I'm implying/trying to figure out with this line of questioning.