Re: [PATCH 3/3] thunderbolt: Enable/disable sideband depending on USB4 port offline mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, Jun 04, 2023 at 12:16:18PM +0300, Yehezkel Bernat wrote:
> On Sun, Jun 4, 2023 at 8:11 AM Mika Westerberg
> <mika.westerberg@xxxxxxxxxxxxxxx> wrote:
> >
> > Hi,
> >
> > On Sat, Jun 03, 2023 at 10:24:38PM +0300, Yehezkel Bernat wrote:
> > > On Fri, Jun 2, 2023 at 12:11 PM Mika Westerberg
> > > <mika.westerberg@xxxxxxxxxxxxxxx> wrote:
> > > >
> > > > When USB4 port is in offline mode (this mean there is no device
> > > > attached) we want to keep the sideband up to make it possible to
> > > > communicate with the retimers. In the same way there is no need to
> > > > enable sideband transactions when the USB4 port is not offline as they
> > > > are already up.
> > > >
> > > > For this reason make the enabling/disabling depend on the USB4 port
> > > > offline status.
> > >
> > > I'm probably missing something here, but if we don't allow disabling it when the
> > > port is offline, and when the port is online the sideband is enabled, when can
> > > it be disabled? If we can manually disable it when the port is online, on
> > > enablement we can't assume that it's already enabled just because the port
> > > is online, as we might have manually disabled it earlier.
> >
> > We allow disabling them when the port is online. This all basically
> > separates how the device attached and non-device attached handle the
> > sideband communications.
> 
> OK, but then we don't enable it back, as we assume it's enabled because the
> port is online, even while the user might have disabled it earlier?

Well there are two "modes" how they are accessed. Normal cases user
cannot offline the port so the sideband comes up when the link comes up
(e.g device is connected). In this case after the retimer enumeration
put them back to "passthrough" mode by sending the UNSET_INBOUND_SBTX.
This is needed to make the link come up after hot-reboot etc and was
recommended by our hardware folks.

The second case is when there is no device attached. This requires
special firmare too. In ChromeOS there is an ACPI _DSM method that does
this and if present we allow user to offline the port but only when
there is no device attached. In this mode we need to bring up the
sideband so we must send the SET_INBOUND_SBTX during enumeration but we
also need to keep them communicating so we cannot send
UNSET_INBOUND_SBTX. This mode is only used to upgrade the retimer NVM
firmware.

This is the idea behind these patches but let me know if I misssed
something.



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux