summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorAnurag <anurag@intel.com>2026-08-27 17:18:45 -0700
committerMika Westerberg <mika.westerberg@linux.intel.com>2026-09-24 06:44:03 +0200
commitaaf6230cb2cd5fc50db9ba6db3b813d1a4b1d582 (patch)
treeba34e95e033639e290fd9582f8d49432c9a30f3d /tools/perf/scripts/python/stackcollapse.py
parent8d55710a8c439c45737f30ccf626d04241b95303 (diff)
downloadlinux-next-aaf6230cb2cd5fc50db9ba6db3b813d1a4b1d582.tar.gz
linux-next-aaf6230cb2cd5fc50db9ba6db3b813d1a4b1d582.zip
thunderbolt: Make software margining error counter configurable
The debugfs software margining run path currently initializes the request with USB4_MARGIN_SW_ERROR_COUNTER_CLEAR, which implicitly clears/enables counters every time software margining is started. On some host-router/firmware implementations that enforce PHY interface for USB4 (PIPE) margining control, CLEAR and START are distinct operations. - CLEAR resets error counters without starting margining - START begins margin testing and error counting Make the error counter operation configurable through debugfs error_counter control instead of hardcoding CLEAR. Additionally, only execute the software margining sampling loop when the selected operation is START; for CLEAR or STOP operations, execute the counter operation and return immediately. Example to CLEAR error counter: cd /sys/kernel/debug/thunderbolt/<ROUTER_ID>/<PORT>/margining echo clear > error_counter Example to START error counter: cd /sys/kernel/debug/thunderbolt/<ROUTER_ID>/<PORT>/margining echo start > error_counter After configuring error counter run software margining for changes to take effect: echo 1 > run This aligns the debugfs behavior with the USB4 v2/PIPE expectation and lets users explicitly choose between CLEAR/START/STOP. Co-developed-by: Rene Sapiens <rene.sapiens@linux.intel.com> Signed-off-by: Rene Sapiens <rene.sapiens@linux.intel.com> Signed-off-by: Anurag <anurag@intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions