mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
54e418106c
This adds debugfs interface that can be used for debugging possible issues in hardware/software. It exposes router and adapter config spaces through files like this: /sys/kernel/debug/thunderbolt/<DEVICE>/regs /sys/kernel/debug/thunderbolt/<DEVICE>/<PORT1>/regs /sys/kernel/debug/thunderbolt/<DEVICE>/<PORT1>/path /sys/kernel/debug/thunderbolt/<DEVICE>/<PORT1>/counters /sys/kernel/debug/thunderbolt/<DEVICE>/<PORT2>/regs /sys/kernel/debug/thunderbolt/<DEVICE>/<PORT2>/path /sys/kernel/debug/thunderbolt/<DEVICE>/<PORT2>/counters ... The "regs" is either the router or port configuration space register dump. The "path" is the port path configuration space and "counters" is the optional counters configuration space. These files contains one register per line so it should be easy to use normal filtering tools to find the registers of interest if needed. The router and adapter regs file becomes writable when CONFIG_USB4_DEBUGFS_WRITE is enabled (which is not supposed to be done in production systems) and in this case the developer can write "offset value" lines there to modify the hardware directly. For convenience this also supports the long format the read side produces (but ignores the additional fields). The counters file can be written even when CONFIG_USB4_DEBUGFS_WRITE is not enabled and it is only used to clear the counter values. Signed-off-by: Gil Fine <gil.fine@intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
acpi.c | ||
cap.c | ||
ctl.c | ||
ctl.h | ||
debugfs.c | ||
dma_port.c | ||
dma_port.h | ||
domain.c | ||
eeprom.c | ||
icm.c | ||
Kconfig | ||
lc.c | ||
Makefile | ||
nhi_ops.c | ||
nhi_regs.h | ||
nhi.c | ||
nhi.h | ||
nvm.c | ||
path.c | ||
property.c | ||
quirks.c | ||
retimer.c | ||
sb_regs.h | ||
switch.c | ||
tb_msgs.h | ||
tb_regs.h | ||
tb.c | ||
tb.h | ||
test.c | ||
tmu.c | ||
tunnel.c | ||
tunnel.h | ||
usb4.c | ||
xdomain.c |