From: Lukas Wunner <lukas@wunner.de>
To: "Kuppuswamy,
Sathyanarayanan" <sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, ashok.raj@intel.com,
dan.j.williams@intel.com, kbusch@kernel.org, knsathya@kernel.org,
Sinan Kaya <okaya@kernel.org>
Subject: Re: [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered
Date: Sun, 28 Mar 2021 11:07:08 +0200 [thread overview]
Message-ID: <20210328090708.GA20590@wunner.de> (raw)
In-Reply-To: <b2e456bf-9e01-a8cc-67b3-2c10fcda3949@linux.intel.com>
On Sat, Mar 27, 2021 at 10:49:45PM -0700, Kuppuswamy, Sathyanarayanan wrote:
> On 3/16/21 9:13 PM, Lukas Wunner wrote:
> > --- a/drivers/pci/hotplug/pciehp_hpc.c
> > +++ b/drivers/pci/hotplug/pciehp_hpc.c
> > @@ -707,6 +707,17 @@ static irqreturn_t pciehp_ist(int irq, void *dev_id)
> > }
> > /*
> > + * Ignore Link Down/Up caused by Downstream Port Containment
> > + * if recovery from the error succeeded.
> > + */
> > + if ((events & PCI_EXP_SLTSTA_DLLSC) && pci_dpc_recovered(pdev) &&
> > + ctrl->state == ON_STATE) {
> > + atomic_and(~PCI_EXP_SLTSTA_DLLSC, &ctrl->pending_events);
>
> Why modify pending_events here. It should be already be zero right?
"pending_events" is expected to contain the Link Up event
after successful recovery, whereas "events" contains the
Link Down event (if DPC was triggered).
pciehp is structured around the generic irq core's separation
of hardirq handler (runs in interrupt context) and irq thread
(runs in task context). The hardirq handler pciehp_isr() picks
up events from the Slot Status register and stores them in
"pending_events" for later consumption by the irq thread
pciehp_ist(). The irq thread performs long running tasks such
as slot bringup and bringdown. The irq thread is also allowed
to sleep.
While pciehp_ist() awaits completion of DPC recovery, a DLLSC
event will be picked up by pciehp_isr() which is caused by
link retraining. That event is contained in "pending_events",
so after successful recovery, pciehp_ist() can just delete it.
Thanks,
Lukas
prev parent reply other threads:[~2021-03-28 9:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-13 3:32 [PATCH v2 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered sathyanarayanan.kuppuswamy
2021-03-13 3:35 ` Kuppuswamy, Sathyanarayanan
2021-03-17 4:13 ` Lukas Wunner
2021-03-17 5:08 ` Dan Williams
2021-03-17 5:31 ` Lukas Wunner
2021-03-17 16:31 ` Dan Williams
2021-03-17 17:19 ` Sathyanarayanan Kuppuswamy Natarajan
2021-03-17 17:45 ` Dan Williams
2021-03-17 17:54 ` Sathyanarayanan Kuppuswamy Natarajan
2021-03-17 19:01 ` Lukas Wunner
2021-03-17 20:02 ` Kuppuswamy, Sathyanarayanan
2021-03-18 15:35 ` Sinan Kaya
2021-03-28 9:53 ` Lukas Wunner
2021-03-17 19:09 ` Lukas Wunner
2021-03-17 19:22 ` Raj, Ashok
2021-03-17 19:40 ` Lukas Wunner
2021-03-28 5:49 ` Kuppuswamy, Sathyanarayanan
2021-03-28 9:07 ` Lukas Wunner [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=20210328090708.GA20590@wunner.de \
--to=lukas@wunner.de \
--cc=ashok.raj@intel.com \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=kbusch@kernel.org \
--cc=knsathya@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=okaya@kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.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).