lkml.org 
[lkml]   [2019]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/28] thunderbolt: Enable TMU access when accessing port space on legacy devices
On Tue, Jan 29, 2019 at 10:58:58PM +0100, Lukas Wunner wrote:
> On Tue, Jan 29, 2019 at 06:01:18PM +0300, Mika Westerberg wrote:
> > + if (enable)
> > + value |= BIT(20);
>
> Can we have a macro for this bit?

Sure.

> > +int tb_port_find_cap(struct tb_port *port, enum tb_port_cap cap)
> > +{
> > + int ret;
> > +
> > + ret = tb_port_enable_tmu(port, true);
> > + if (ret)
> > + return ret;
> > +
> > + ret = __tb_port_find_cap(port, cap);
> > +
> > + tb_port_enable_tmu(port, false);
> > +
> > + return ret;
> > +}
>
> Would there be a downside to setting the TMU bit on all ports all the time
> (e.g. on switch enumeration)?

You mean turn it on once and keep it like that? Quick experimentation
with a couple of LR devices did not show any side-effects so I guess we
could just turn it on once during the enumeration in affected devices.

Main reason it is now in cap.c is because we only need it to be enabled
during the cap walk and that allows keeping both workarounds in the same
file close to the place where it is used.

\
 
 \ /
  Last update: 2019-01-30 10:38    [W:0.060 / U:26.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site