diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2022-02-13 11:42:23 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2022-05-05 09:24:49 +0300 |
commit | 90f720d2292f52de51df2307272a8f8cf7ef7134 (patch) | |
tree | 38f8590f2b03a7f895a824d0e2ba46d504c8e545 /drivers/thunderbolt | |
parent | 5dddb41692849594862473e4ddf57fb52e1249d6 (diff) | |
download | linux-90f720d2292f52de51df2307272a8f8cf7ef7134.tar.gz linux-90f720d2292f52de51df2307272a8f8cf7ef7134.tar.bz2 linux-90f720d2292f52de51df2307272a8f8cf7ef7134.zip |
thunderbolt: Add debug logging when lane is enabled/disabled
This is useful when debugging possible issues.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r-- | drivers/thunderbolt/switch.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index ac87e8b50e52..2d8a0fd3469c 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -693,8 +693,14 @@ static int __tb_port_enable(struct tb_port *port, bool enable) else phy |= LANE_ADP_CS_1_LD; - return tb_port_write(port, &phy, TB_CFG_PORT, - port->cap_phy + LANE_ADP_CS_1, 1); + + ret = tb_port_write(port, &phy, TB_CFG_PORT, + port->cap_phy + LANE_ADP_CS_1, 1); + if (ret) + return ret; + + tb_port_dbg(port, "lane %sabled\n", enable ? "en" : "dis"); + return 0; } /** |