From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sinan Kaya Subject: Re: [PATCH V5 3/3] PCI: Mask and unmask hotplug interrupts during reset Date: Tue, 3 Jul 2018 11:49:47 -0400 Message-ID: <867e1f69-8b77-ecb0-d4e3-ab0636a49a2e@codeaurora.org> References: <1530571967-19099-1-git-send-email-okaya@codeaurora.org> <1530571967-19099-4-git-send-email-okaya@codeaurora.org> <20180703143434.GA4086@wunner.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: poza@codeaurora.org, Lukas Wunner Cc: linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjorn Helgaas , Keith Busch , open list List-Id: linux-arm-msm@vger.kernel.org On 7/3/2018 11:12 AM, poza@codeaurora.org wrote: > if (!pci_probe_reset_slot(dev->slot)) > { >     pci_reset_slot(dev->slot) >     result = reset_link(udev, service); >> in this case aer_root_reset must not call pci_reset_bridge_secondary_bus() > } else >     result = reset_link(udev, service); >> in this case aer_root_reset must call pci_reset_bridge_secondary_bus() [since bridge is not hotplug capable) Here are two different flow for two different FATAL error sources dpc_irq link is down due to DPC pcie_do_fatal_recovery() pci_reset_slot() mask hotplug IRQ secondary bus reset unmask hotplug IRQ undefined behavior as link went down due to DPC dpc_reset_link() undefined behavior secondary bus reset happened while a DPC event is pending link may or may not be up at this moment recover the link via DPC way if HW can cope with this undefined behavior. aer_irq link is up pcie_do_fatal_recovery() pci_reset_slot() mask hotplug IRQ secondary bus reset unmask hotplug IRQ link goes up aer_reset_link() secondary bus reset hotplug link down interrupt again I tried to change pci_reset_slot() such that we do mask hotplug IRQ go to AER/DPC reset_link based on error source unmask hotplug IRQ -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.