public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: simon.guinot@sequanux.org
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Simon Guinot <simon.guinot@seagate.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Maciej W . Rozycki" <macro@orcam.me.uk>,
	linux-pci@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH] PCI: fix link retrain status in pcie_wait_for_link_delay()
Date: Wed, 13 Mar 2024 14:55:03 +0100	[thread overview]
Message-ID: <ZfGwN0PWF6M9kp0v@localhost> (raw)
In-Reply-To: <53b2239b-4a23-a948-a422-4005cbf76148@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1523 bytes --]

On Wed, Mar 13, 2024 at 02:00:21PM +0200, Ilpo Järvinen wrote:
> On Wed, 13 Mar 2024, Simon Guinot wrote:
> 
> > The current code in pcie_wait_for_link_delay() handles the value
> > returned by pcie_failed_link_retrain() as an integer, expecting 0
> > when the link has been successfully retrained. The issue is that
> > pcie_failed_link_retrain() returns a boolean: "true" if the link
> > has been successfully retrained and "false" otherwise. This leads
> > pcie_wait_for_link_delay() to return an incorrect "active link"
> > status when pcie_failed_link_retrain() is called.
> > 
> > This patch fixes the check of the value returned by
> > pcie_failed_link_retrain() in pcie_wait_for_link_delay().
> > 
> > Note that this bug induces abnormal timeout delays when a PCI device
> > is unplugged (around 60 seconds per bridge / secondary bus removed).
> > 
> > Cc: stable@vger.kernel.org
> > Fixes: 1abb47390350 ("Merge branch 'pci/enumeration'")
> > Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
> 
> Hi Simon,
> 
> Thanks for your patch. There's, however, already a better series to fix 
> this and other related issues. Bjorn just hasn't gotten into applying them 
> yet:
> 
> https://patchwork.kernel.org/project/linux-pci/list/?series=824858
> 
> (I proposed a patch very similar to yours month ago, but Maciej came up 
> a better way to fix all the issues.)

Hi Ilpo,

Thanks for pointing this patch series. This indeed fixes the timeout delay
issue I observed.

Simon

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-03-13 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  9:49 [PATCH] PCI: fix link retrain status in pcie_wait_for_link_delay() Simon Guinot
2024-03-13 12:00 ` Ilpo Järvinen
2024-03-13 13:55   ` simon.guinot [this message]

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=ZfGwN0PWF6M9kp0v@localhost \
    --to=simon.guinot@sequanux.org \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=simon.guinot@seagate.com \
    --cc=stable@vger.kernel.org \
    /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