From patchwork Wed Sep 5 20:35:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 10589411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 859B05A4 for ; Wed, 5 Sep 2018 20:34:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76F362A99E for ; Wed, 5 Sep 2018 20:34:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AC5E2A9AD; Wed, 5 Sep 2018 20:34:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06A912A926 for ; Wed, 5 Sep 2018 20:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728016AbeIFBGe (ORCPT ); Wed, 5 Sep 2018 21:06:34 -0400 Received: from mga01.intel.com ([192.55.52.88]:26317 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727477AbeIFBGe (ORCPT ); Wed, 5 Sep 2018 21:06:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Sep 2018 13:34:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,334,1531810800"; d="scan'208";a="260164647" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.44]) by fmsmga005.fm.intel.com with ESMTP; 05 Sep 2018 13:34:22 -0700 From: Keith Busch To: Linux PCI , Bjorn Helgaas Cc: Benjamin Herrenschmidt , Sinan Kaya , Thomas Tai , poza@codeaurora.org, Lukas Wunner , Christoph Hellwig , Keith Busch Subject: [PATCHv2 00/20] PCI, error handling and hot plug Date: Wed, 5 Sep 2018 14:35:26 -0600 Message-Id: <20180905203546.21921-1-keith.busch@intel.com> X-Mailer: git-send-email 2.13.6 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP v1 -> v2: * Use Dennis' patch for the incorrect slot reset detection since he posted that fix first * I found some DPC and HPC capable ports (PLX Device 9781 to be specific) that don't have data-link active reporting capabilities, so I added another patch to handle that * If the recovery determines the precence detection has changed during error handling, we need to prevent the downstream driver from accessing the device under its old context. This was a little tricky because of a circular dependency on the pci_bus_sem, so there is a prep patch to allow recursive pci bus walking, and then we use it from pciehp's slot_reset callback. * Make error handling not able to change the error state away from pci_channel_state_perm_failure so that hotplug and error handling may use the same state (suggested by Benjamin Herrenschmidt) * Moved the link active wait requirements into generic code (suggested by Sinan Kaya) * Check for successful secondary bus reset on recovery failure (suggested by Sinan Kaya) * Use pcie_device for service driver error callbacks (suggested by Lukas Wunner) * Hold pci_slot_lock when doing a slot reset (suggested by Lukas Wunner) * Fixed processing user orderly hotplug requests during error handling suggested by Lukas Wunner) * Various code cleanups (suggested by Christoph Hellwig) * Split dpc code cleanup into separate patch * Changelog grammer fixes and wording clarity Dennis Dalessandro (1): PCI: Fix faulty logic in pci_reset_bus() Keith Busch (18): PCI: Add required waits on link active PCI/AER: Remove dead code PCI/ERR: Use slot reset if available PCI/ERR: Handle fatal error recovery PCI/ERR: Always use the first downstream port PCI/ERR: Simplify broadcast callouts PCI/ERR: Report current recovery status for udev PCI/ERR: Remove devices on recovery failure PCI/portdrv: Provide pci error callbacks PCI/portdrv: Restore pci state on slot reset PCI: Make link active reporting detection generic PCI: Create recursive bus walk PCI/pciehp: Fix powerfault detection order PCI/pciehp: Implement error handling callbacks PCI/pciehp: Ignore link events during DPC event PCI/DPC: Wait for link active after reset PCI/DPC: Link reset code cleanup PCI: Unify device inaccessible Lukas Wunner (1): PCI: Simplify disconnected marking drivers/pci/bus.c | 14 +- drivers/pci/hotplug/pciehp.h | 2 +- drivers/pci/hotplug/pciehp_core.c | 39 +++++ drivers/pci/hotplug/pciehp_hpc.c | 56 +++---- drivers/pci/hotplug/pciehp_pci.c | 9 +- drivers/pci/pci.c | 68 +++++++- drivers/pci/pci.h | 17 +- drivers/pci/pcie/aer.c | 27 ++-- drivers/pci/pcie/dpc.c | 37 +++-- drivers/pci/pcie/err.c | 327 +++++++++++++------------------------- drivers/pci/pcie/portdrv.h | 10 +- drivers/pci/pcie/portdrv_pci.c | 45 +++++- drivers/pci/probe.c | 1 + drivers/pci/slot.c | 2 +- include/linux/pci.h | 10 ++ 15 files changed, 353 insertions(+), 311 deletions(-)