From patchwork Fri Aug 31 21:26:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 10584449 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 085DE5A4 for ; Fri, 31 Aug 2018 21:25:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E46952C6E4 for ; Fri, 31 Aug 2018 21:25:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D88262C6EF; Fri, 31 Aug 2018 21:25:24 +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 815942C6E4 for ; Fri, 31 Aug 2018 21:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727282AbeIABem (ORCPT ); Fri, 31 Aug 2018 21:34:42 -0400 Received: from mga12.intel.com ([192.55.52.136]:14083 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbeIABem (ORCPT ); Fri, 31 Aug 2018 21:34:42 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2018 14:25:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,313,1531810800"; d="scan'208";a="86663792" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.44]) by orsmga001.jf.intel.com with ESMTP; 31 Aug 2018 14:25:22 -0700 From: Keith Busch To: Linux PCI , Bjorn Helgaas Cc: Benjamin Herrenschmidt , Sinan Kaya , Thomas Tai , poza@codeaurora.org, Lukas Wunner , Keith Busch Subject: [PATCH 00/16] PCI, error handling and hot plug Date: Fri, 31 Aug 2018 15:26:23 -0600 Message-Id: <20180831212639.10196-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 This series is all about error handling and hot plug. It should get the AER fatal handling much like how it was before where we don't always tear down and re-enumerate the topology, but even better in taht it won't trigger hotplug events to the extent possibe to suppress link events that occur from the secondary bus reset. Ports that do not implement an out-of-band presence detection mechanism may still have their device removed on the DPC and AER error handling, but at least error handling for non-hot pluggable ports won't experience removals anymore. Some of these are simple bug fixes, some are more complicated. Patch 11 fixes a long-standing issue where a RP detected fatal error never restored the downstream bridges, making recovery of end devices below those switches bound to fail after a secondary bus reset resets the bridge's config memory and bus windows. Comments welcomed! Keith Busch (15): PCI: Fix pci_reset_bus PCI/AER: Remove dead code PCI/ERR: Use slot reset if available PCI/ERR: Handle fatal error recovery PCI/ERR: Remove devices on recovery failure PCI/ERR: Always use the first downstream port PCI/ERR: Simplify broadcast callouts PCI/ERR: Report current recovery status for udev PCI/portdrv: Provide pci error callbacks PCI/portdrv: Restore pci state on slot reset PCI/pciehp: Fix powerfault detection order PCI/pciehp: Implement error handling callbacks PCI/pciehp: Ignore link events during DPC event PCI/DPC: Wait for reset complete PCI: Unify device inaccessible Lukas Wunner (1): PCI: Simplify disconnected marking drivers/pci/hotplug/pciehp.h | 1 + drivers/pci/hotplug/pciehp_core.c | 51 +++++++ drivers/pci/hotplug/pciehp_hpc.c | 34 +++-- drivers/pci/hotplug/pciehp_pci.c | 9 +- drivers/pci/pci.c | 32 ++++- drivers/pci/pci.h | 12 +- drivers/pci/pcie/aer.c | 15 +- drivers/pci/pcie/dpc.c | 40 ++++-- drivers/pci/pcie/err.c | 293 ++++++++++++++------------------------ drivers/pci/pcie/portdrv.h | 6 + drivers/pci/pcie/portdrv_pci.c | 37 ++++- include/linux/pci.h | 6 + 12 files changed, 299 insertions(+), 237 deletions(-)