[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKF3qh1coHqCHqpa_f8Mh4Ere+_xE2qACoNSyo2wYiOboYiNjQ@mail.gmail.com>
Date: Wed, 7 Oct 2020 15:48:17 +0800
From: Ethan Zhao <xerces.zhao@...il.com>
To: Lukas Wunner <lukas@...ner.de>
Cc: Ethan Zhao <haifeng.zhao@...el.com>,
Bjorn Helgaas <bhelgaas@...gle.com>, Oliver <oohall@...il.com>,
ruscur@...sell.cc,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Stuart Hayes <stuart.w.hayes@...il.com>,
Alexandru Gagniuc <mr.nuke.me@...il.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-pci <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Raj, Ashok" <ashok.raj@...ux.intel.com>,
Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@...el.com>
Subject: Re: [PATCH v7 3/5] PCI: pciehp: check and wait port status out of DPC
before handling DLLSC and PDC
Lukas,
On Mon, Oct 5, 2020 at 3:13 AM Lukas Wunner <lukas@...ner.de> wrote:
>
> On Sat, Oct 03, 2020 at 03:55:12AM -0400, Ethan Zhao wrote:
> > When root port has DPC capability and it is enabled, then triggered by
> > errors, DPC DLLSC and PDC etc interrupts will be sent to DPC driver, pciehp
> > drivers almost at the same time.
>
> Do the DLLSC and PDC events occur as a result of handling the error
> or do they occur independently?
They could happen independently if links were recovered then the card
was removed.
They could happen as a result of handling the errors the same time.
So don't assume DLLSC and PDC all occur at the same time.
>
> If the latter, I don't see how we can tell whether the card in the
> slot is still the same.
If PDC happens, the card in the slot might not be the same. so
hot-removal /hot -plugin handling follows the PDC event.
>
> If the former, holding the hotplug slot's reset_lock and doing something
> along the lines of pciehp_reset_slot() (or calling it directly) might
> solve the race.
DPC reset is done by hardware, only AER calls pciehp_reset_slot() as recovery
handling initiated by software.
Thanks,
Ethan
>
> Thanks,
>
> Lukas
Powered by blists - more mailing lists