From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Lukas Wunner <lukas@wunner.de>, Bjorn Helgaas <helgaas@kernel.org>
Cc: Andrew <andreasx0@protonmail.com>,
"Maciej W. Rozycki" <macro@orcam.me.uk>,
Matthew W Carlis <mattc@purestorage.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: Fix link speed calculation on retrain failure
Date: Tue, 24 Jun 2025 15:28:07 +0300 (EEST) [thread overview]
Message-ID: <8bc398ab-bf76-cf46-f67d-684229ee6de1@linux.intel.com> (raw)
In-Reply-To: <aFqXz8llC2gYl5XJ@wunner.de>
[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]
On Tue, 24 Jun 2025, Lukas Wunner wrote:
> On Tue, Jun 24, 2025 at 02:23:33PM +0300, Ilpo Järvinen wrote:
> > On Mon, 23 Jun 2025, Lukas Wunner wrote:
> > > --- a/drivers/pci/quirks.c
> > > +++ b/drivers/pci/quirks.c
> > > @@ -108,7 +108,7 @@ int pcie_failed_link_retrain(struct pci_dev *dev)
> > > pcie_capability_read_word(dev, PCI_EXP_LNKCTL2, &lnkctl2);
> > > pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnksta);
> > > if (!(lnksta & PCI_EXP_LNKSTA_DLLLA) && pcie_lbms_seen(dev, lnksta)) {
> > > - u16 oldlnkctl2 = lnkctl2;
> > > + u16 oldlnkctl2 = lnkctl2 & PCI_EXP_LNKCTL2_TLS;
> > >
> > > pci_info(dev, "broken device, retraining non-functional downstream link at 2.5GT/s\n");
> >
> > IIRC, there was a patch from somebody else which fixed this a bit
> > differently but never got applied (many months ago by now).
>
> Must be this one, still marked "New" in patchwork:
>
> https://patchwork.kernel.org/project/linux-pci/patch/20250123055155.22648-2-sjiwei@163.com/
>
> I don't care which one gets applied, as long as the issue is fixed.
Yes, that's the one.
It seemed pointless to me to require callers to apply the mask to
the register value when the conversion helper could do that itself,
especially when the macro takes in a parameter called "lnkctl2".
--
i.
next prev parent reply other threads:[~2025-06-24 12:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 13:22 [PATCH] PCI: Fix link speed calculation on retrain failure Lukas Wunner
2025-06-23 13:49 ` Sathyanarayanan Kuppuswamy
2025-06-24 11:23 ` Ilpo Järvinen
2025-06-24 12:19 ` Lukas Wunner
2025-06-24 12:28 ` Ilpo Järvinen [this message]
2025-06-24 16:48 ` Bjorn Helgaas
2025-06-24 18:13 ` Sathyanarayanan Kuppuswamy
2025-06-25 16:06 ` andreasx0
2025-06-25 17:46 ` Bjorn Helgaas
2025-06-26 22:33 ` andreasx0
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=8bc398ab-bf76-cf46-f67d-684229ee6de1@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=andreasx0@protonmail.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=macro@orcam.me.uk \
--cc=mattc@purestorage.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;
as well as URLs for NNTP newsgroup(s).