STRUCT USB4_PORT_MARGINING_PARAMS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct usb4_port_margining_params(9) 🌸

okay so this is from the Kernel API Manual bestie, and we're about to get deep into USB4 margining parameters πŸ’… like this is the struct that holds all the little knobs for margin testing, and ngl she's lowkey iconic for it πŸŽ€


✨ NAME ✨

struct usb4_port_margining_params β€” USB4 margining parameters, that's the whole vibe πŸ¦‹


🌈 SYNOPSIS 🌈

struct usb4_port_margining_params {
    enum usb4_margin_sw_error_counter error_counter;
    u32 ber_level;
    enum usb4_margining_lane lanes;
    u32 voltage_time_offset;
    bool optional_voltage_offset_range;
    bool right_high;
    bool upper_eye;
    bool time;
 };

like, that's her. that's the whole struct. no cap πŸ’–


πŸ‘‘ Members πŸ‘‘

okay so every single field gets her moment, periodt:

  • error_counter β€” the error counter operation for software margining πŸ’« like that's what she's here for
  • ber_level β€” the current BER level contour value ⭐ (BER = bit error rate, and she's got a contour value)
  • lanes β€” the lanes to enable for the margining operation πŸ¦‹ which ones are we turning on, bestie
  • voltage_time_offset β€” the offset for voltage / time for software margining πŸŽ€ that's the whole point of her
  • optional_voltage_offset_range β€” enable the optional extended voltage range πŸ”₯ she's got range, literally
  • right_high β€” false if a left/low margin test is performed, true if right/high 🌸 so like, pick a side
  • upper_eye β€” true if the margin test is done on the upper eye, false if done on the lower eye πŸ‘οΈβœ¨ eye diagram moment
  • time β€” true if time margining is used instead of voltage ⏰ she can do either, she's flexible like that
fr fr though β€” right_high, upper_eye, and time are all booleans where the meaning flips depending on the value, so don't just assume true = "good". read the description, bestie πŸ™ˆ

🫢 SEE ALSO 🫢

okay this list is long but we do not skip a single one, iykyk 😭 she's connected to the whole thunderbolt family:

Kernel file ./drivers/thunderbolt/tb.h β€” and also: struct tb_nvm(9), enum tb_switch_tmu_mode(9), struct tb_switch_tmu(9), struct tb_switch(9), struct tb_bandwidth_group(9), struct tb_port(9), struct usb4_port(9), struct tb_retimer(9), struct tb_path_hop(9), enum tb_path_port(9), struct tb_path(9), struct tb_cm_ops(9), tb_upstream_port(9), tb_is_upstream_port(9), tb_port_has_remote(9), tb_domain_event(9), tb_switch_for_each_port(9), tb_switch_downstream_port(9), tb_switch_depth(9), tb_switch_is_icm(9), tb_switch_tmu_is_configured(9), tb_switch_tmu_is_enabled(9), tb_switch_clx_is_enabled(9), tb_port_path_direction_downstream(9), tb_for_each_port_on_path(9), tb_for_each_upstream_port_on_path(9), tb_path_for_each_hop(9), tb_downstream_route(9), tb_xdomain_downstream_port(9), usb4_switch_version(9), tb_switch_is_usb4(9), enum usb4_sb_target(9), enum usb4_margin_sw_error_counter(9)

like… she knows everyone πŸ’€πŸ’–


🧚 sign-off 🧚

this little page lives in ./drivers/thunderbolt, and the version stamp is October 2026 πŸ“… so yeah, she's from the future, slay ⭐ and the title up top is struct usb4...ining_params(9) in case you forgot where you were πŸ’œ

go forth and margin, bestie β€” ate and left no crumbs πŸ“βœ¨

πŸ“¦ where this page comes from