Hi Gil, On Sun, May 01, 2022 at 11:33:17PM +0300, Gil Fine wrote: > We can't enable CLx if it is not supported either by the host or device, > or by the USB4/TBT link (e.g. when an optical cable is used). > We silently ignore CLx enabling in this case. > > Signed-off-by: Gil Fine <gil.fine@xxxxxxxxx> > --- > drivers/thunderbolt/tb.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c > index 44d04b651a8b..7419cd1aefba 100644 > --- a/drivers/thunderbolt/tb.c > +++ b/drivers/thunderbolt/tb.c > @@ -581,6 +581,7 @@ static void tb_scan_port(struct tb_port *port) > struct tb_cm *tcm = tb_priv(port->sw->tb); > struct tb_port *upstream_port; > struct tb_switch *sw; > + int ret; > > if (tb_is_upstream_port(port)) > return; > @@ -669,7 +670,9 @@ static void tb_scan_port(struct tb_port *port) > tb_switch_lane_bonding_enable(sw); > /* Set the link configured */ > tb_switch_configure_link(sw); > - if (tb_switch_enable_clx(sw, TB_CL0S)) > + /* Silently ignore CLx enabling in case CLx is not supported */ > + ret = tb_switch_enable_clx(sw, TB_CL0S); > + if (ret && ret != -EOPNOTSUPP) I think we can debug log this and also: > tb_sw_warn(sw, "failed to enable CLx on upstream port\n"); can we use something like "failed to enable CL%d on upstream port\n" and pass the CL state there too? I think it is useful to see what what CL state failed.