Re: PCI: Work around PCIe link training failures

Maciej W. Rozycki
2024-08-07T11:49:11Z

On Mon, 5 Aug 2024, Matthew W Carlis wrote:

> The most common place where we see our systems getting stuck at Gen1 is with
> device power cycling. If a device is powered on and then off quickly then the
> link will of course fail to train & the consequence here is that the port is
> forced to Gen1 forever. Does anybody know why the patch will only remove the
> forced Gen1 speed from the ASMedia device?

I know, as the author of the change.

The reason for this is safety: it's better to have a link run at 2.5GT/s
than not at all, and from the nature of the issue there is no guarantee
that if you remove the speed clamp, then the link won't go back into the
infinite retraining loop that the workaround is supposed to break.

I was only able to verify that the speed clamp is safe to lift with this
particular device, but if you hit the actual issue with any other device
and find that it is safe to remove the clamp as well, then you're welcome
to add it to the list too.

Maciej