Re: [Patch v2] thunderbolt: Add quirk to reset downstream port

From: Mika Westerberg
Date: Wed Nov 22 2023 - 02:32:41 EST


On Wed, Nov 22, 2023 at 08:03:16AM +0200, Mika Westerberg wrote:
> also please make it a separate function, tb_port_reset() following the
> similar tb_port_unlock() and friends. With the matching kernel-doc and
> everything.
>
> > + val = val | PORT_CS_19_DPR;
> > + ret = tb_port_write(port, &val, TB_CFG_PORT,
> > + port->cap_usb4 + PORT_CS_19, 1);
>
> Since it is using cap_usb4 you probably need to make usb4_port_reset()
> as well that gets called from tb_port_reset() (try to make it as simple
> as possible though).

Also please make sure it follows the CM guide 7.2 "Downstream Port Reset
and Change of Link Parameters" so that it observes the 10ms delay and
such.