From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Matthew W Carlis <mattc@purestorage.com>,
ALOK TIWARI <alok.a.tiwari@oracle.com>,
ashishk@purestorage.com, msaggi@purestorage.com,
sconnor@purestorage.com, Lukas Wunner <lukas@wunner.de>,
Jiwei <jiwei.sun.bj@qq.com>,
guojinhui.liam@bytedance.com, ahuang12@lenovo.com,
sunjw10@lenovo.com, linux-pci@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: Always lift 2.5GT/s restriction in PCIe failed link retraining
Date: Mon, 1 Dec 2025 18:48:45 +0200 (EET) [thread overview]
Message-ID: <4bf967a6-0918-d074-58bb-f0aebf6ceeb6@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2512011319590.49654@angie.orcam.me.uk>
[-- Attachment #1: Type: text/plain, Size: 1732 bytes --]
On Mon, 1 Dec 2025, Maciej W. Rozycki wrote:
> On Mon, 1 Dec 2025, Ilpo Järvinen wrote:
>
> > > + pcie_capability_read_dword(dev, PCI_EXP_LNKCAP, &lnkcap);
> > > + if ((lnkctl2 & PCI_EXP_LNKCTL2_TLS) == PCI_EXP_LNKCTL2_TLS_2_5GT &&
> > > + (lnkcap & PCI_EXP_LNKCAP_SLS) != PCI_EXP_LNKCAP_SLS_2_5GB) {
> >
> > I'm trying to recall, if there was some particular reason why
> > ->supported_speeds couldn't be used in this function. It would avoid the
> > need to read LinkCap at all.
>
> Thanks for the hint. There's probably none and it's just me missing some
> of the zillion bits and pieces. I'll wait a couple of days for any other
> people to chime in and respin with this update included if everyone is
> otherwise happy to proceed with this update.
>
> > > + if (ret)
> > > + goto err;
> > > }
> > >
> > > return ret;
> >
> > return 0;
>
> It can still return -ENOTTY if neither of the two latter conditionals
> matched, meaning the quirk was not applicable after all. ISTR you had
> issues with the structure of this code before; I am not sure if it can
> be made any better in a reasonable way. It is not a failure per se, so
> the newly-added common error path does not apply. This is the case for:
> "Return an error if retraining was not needed[...]" from the introductory
> comment.
>
> Shall I add a comment above the return statement referring to this?
I think it's fine as is, I just didn't review with enough context to
notice what it was initialized to (the usual thing when adding a
rollback path is to forget to change the normal path to return 0, thus
"auto commenting" it without checking enough, I'm sorry about that).
--
i.
next prev parent reply other threads:[~2025-12-01 16:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 3:52 [PATCH] PCI: Always lift 2.5GT/s restriction in PCIe failed link retraining Maciej W. Rozycki
2025-12-01 9:45 ` Ilpo Järvinen
2025-12-01 13:55 ` Maciej W. Rozycki
2025-12-01 16:48 ` Ilpo Järvinen [this message]
2025-12-08 19:24 ` Maciej W. Rozycki
2025-12-02 13:49 ` [External] : " ALOK TIWARI
2025-12-02 16:07 ` Ilpo Järvinen
2025-12-03 19:01 ` Maciej W. Rozycki
2025-12-08 19:25 ` Maciej W. Rozycki
2025-12-04 1:40 ` [PATCH 2/2] PCI: Fix the PCIe bridge decreasing to Gen 1 during hotplug testing Matthew W Carlis
2025-12-04 23:43 ` Maciej W. Rozycki
2025-12-04 18:30 ` [PATCH] PCI: Always lift 2.5GT/s restriction in PCIe failed link retraining Matthew W Carlis
2025-12-08 19:25 ` Maciej W. Rozycki
-- strict thread matches above, loose matches on Subject: below --
2026-02-19 21:26 [PATCH v2 0/3] " Bjorn Helgaas
2026-02-19 22:09 ` [PATCH] " Matthew W Carlis
2026-02-19 22:53 ` Bjorn Helgaas
2026-02-20 12:03 ` Maciej W. Rozycki
2026-02-23 17:36 ` Bjorn Helgaas
2026-02-23 22:49 ` Matthew W Carlis
2026-02-23 23:14 ` Maciej W. Rozycki
2026-02-25 1:41 ` Matthew W Carlis
2026-02-26 22:02 ` Maciej W. Rozycki
2026-03-26 19:52 ` ALOK TIWARI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4bf967a6-0918-d074-58bb-f0aebf6ceeb6@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=ahuang12@lenovo.com \
--cc=alok.a.tiwari@oracle.com \
--cc=ashishk@purestorage.com \
--cc=bhelgaas@google.com \
--cc=guojinhui.liam@bytedance.com \
--cc=jiwei.sun.bj@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=macro@orcam.me.uk \
--cc=mattc@purestorage.com \
--cc=msaggi@purestorage.com \
--cc=sconnor@purestorage.com \
--cc=sunjw10@lenovo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox