[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.2408250151050.30766@angie.orcam.me.uk>
Date: Sun, 25 Aug 2024 14:48:42 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...am.me.uk>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
cc: Matthew W Carlis <mattc@...estorage.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Oliver O'Halloran <oohall@...il.com>, linux-pci@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/4] PCI: Revert to the original speed after PCIe
failed link retraining
On Thu, 22 Aug 2024, Ilpo Järvinen wrote:
> > linux-pcie-failed-link-retrain-fail-unclamp.diff
> > Index: linux-macro/drivers/pci/quirks.c
> > ===================================================================
> > --- linux-macro.orig/drivers/pci/quirks.c
> > +++ linux-macro/drivers/pci/quirks.c
> > @@ -100,6 +106,9 @@ bool pcie_failed_link_retrain(struct pci
> >
> > if (pcie_retrain_link(dev, false)) {
> > pci_info(dev, "retraining failed\n");
> > + pcie_capability_write_word(dev, PCI_EXP_LNKCTL2,
> > + oldlnkctl2);
> > + pcie_retrain_link(dev, false);
>
> Hi again all,
>
> While rebasing the bandwidth controller patches, I revisited this line and
> realized using false for use_lt is not optimal here.
>
> It would definitely seem better to use LT (true) in this case because it
> likely results in much shorter wait. In hotplug cases w/o a peer device,
> DLLLA will just make the wait last until the timeout, whereas LT would
> short-circuit the training almost right away I think (mostly guessing with
> limited knowledge about LTSSM). We are no longer even expecting the link
> to come up at this point so using DLLLA seems illogical.
Good point, I haven't given this part much thought and just pasted the
same call to `pcie_retrain_link' as above. At worst we'll hit the same
timeout, but as you write we don't expect DLLLA to ever come up at this
point and LT may come down long before the timeout (and if it oscillates
and we probe at the wrong moments, then we'll hit the timeout anyway).
> Do you agree?
I do. Thank you for your suggestion, I have posted v3 now with your
suggested update only.
Maciej
Powered by blists - more mailing lists