lkml.org 
[lkml]   [2024]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] PCI: Cleanup link activation wait logic
On Fri, 16 Feb 2024, Ilpo Järvinen wrote:

> > You change the logic here in that the second conditional isn't run if the
> > first has not. This is wrong, unclamping is not supposed to rely on LBMS.
> > It is supposed to be always run and any failure has to be reported too, as
> > a retraining error.
>
> Now that (I think) I fully understand the intent of the second
> condition/block one additional question occurred to me.
>
> How is the 2nd condition even supposed to work in the current place when
> firmware has pre-arranged the 2.5GT/s resctriction? Wouldn't the link come
> up fine in that case and the quirk code is not called at all since the
> link came up successfully?

The quirk is called unconditionally from `pci_device_add', so an attempt
to unclamp will always happen with a working link for qualifying devices.

> Yet another thing in this quirk code I don't like is how it can leaves the
> target speed to 2.5GT/s when the quirk fails to get the link working
> (which actually does happen in the disconnection cases because DLLLA won't
> be set so the target speed will not be restored).

I chose to leave the target speed at the most recent setting, because the
link doesn't work in that case anyway, so I concluded it doesn't matter,
but reduces messing with the device; technically you should retrain again
afterwards. I'm not opposed to changing this if you have a use case.

Maciej

\
 
 \ /
  Last update: 2024-05-27 15:06    [W:0.214 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site