Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1445656pxf; Fri, 12 Mar 2021 09:38:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQqa62EsiQINqIa0mGQsOmBhY9bpTnqxRk/7pGpE8AMvb8/yzRWbiM6QGwDDgXNR7rmXFC X-Received: by 2002:a05:6402:4314:: with SMTP id m20mr15159221edc.5.1615570703399; Fri, 12 Mar 2021 09:38:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615570703; cv=none; d=google.com; s=arc-20160816; b=Olq1ojvm8a4sfPYnN78w+u53gTVhG4qvTXDHj7Dwba7X90fDFevYEDNHGRryGU+2g1 L1j3LLpFuH/pDePUFkqn+excYJa/nC1z06K3YbkKyn0hDN04WADwNuXPXhLF+CRnmWk9 erK7PxSoYr8dRYapzb/jzSj5gGOUzTXJCfZtOArnMYmAKTpKiCU88C7Zz6ObvQVhVrHo 9kuJfbIjkC6rZLZ1uoOJ4elNSdMBv87ITaP1I9ReSvq/yYQheG1yn87nvA6loNfIDnXQ FISx11iJSAC529484O6ayZeGWs7NT4Yz6faobyd2BDl5/P5bIf9+3B4JJhvmYeDKjqYl pt6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5ihFZ7BHLilp/vZCzAtM3Ib6e3/Q4HLkfYso80HW+1A=; b=LtD2Rvux/JTmf594/iwyjCgbiTuOPlz8lYker8WjTUdA4rEU4NX/SUUeksxkJvwer2 D8NDqZT1s3fU0L2UWPHSMy7IBYANhNjz9TuVS5wkwBXU6rPUk0BXChdsEZ4nsYJrURqI d8oInXwtXch1ZMarMfW0Wp/tSu24WzpI64fqCjzqVwljT6EgPJw92esioxhE+XDQ67pW mXiQWr5QwHphswv7unMS8T62q36dNfKOQRkThQTG8V+xanJS+Imoka+63YUModlHOSbB PSsonjJDUu/8Tf5X4Pv4reX/nQfdxfO2H8Q2GI5PJ2vjI2RbVxqPxOOREcVdJCTowFTx nizw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=By+wEJ2g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si4633187edn.317.2021.03.12.09.37.59; Fri, 12 Mar 2021 09:38:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=By+wEJ2g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232384AbhCLRgy (ORCPT + 99 others); Fri, 12 Mar 2021 12:36:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232392AbhCLRgj (ORCPT ); Fri, 12 Mar 2021 12:36:39 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADFABC061574; Fri, 12 Mar 2021 09:36:39 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id s21so5481252pjq.1; Fri, 12 Mar 2021 09:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5ihFZ7BHLilp/vZCzAtM3Ib6e3/Q4HLkfYso80HW+1A=; b=By+wEJ2gTR3BGf3ZwucvwFywlAr3EOl1y2J1RgszSFax28ruvnMz//bqhTRizLaSas ZdnzOumuXuFZoQ7d+aKSIMBYg4seGF1Gq30Y3lADRwXn380JHlwDQmVWnCfubxhHo2yH fXLR6tJooSTg+KyVFfsVl5/z+Bxk/50iRr71NON4ZbX1ydqfr+XSJYmXB/sgOm8YcQKT MStxiHACLZrAO457oDOPum/N2PCmE2HsNp9pRZe0CsNa3CfREPOkmKSeq9rx+kAsRFAH rIt+dEP7z/gNBECZKSCXBgW21+bZ1vwy/e5EDfuUSSUVAMp7IZboJMROq1DnnlM3ROMc nadA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5ihFZ7BHLilp/vZCzAtM3Ib6e3/Q4HLkfYso80HW+1A=; b=UESW6DwzePQYJnTWwozt320EKnfgF/xFasW0qqI+FUTxWLMjgZExTygU7s4iyDB0EP ksWp0LkT5ygSsGND5EOL/dRAmm6+d/P1maHw7lq1Fkm8BuWZy1dwL28ksjkFV3HOLsTt 52DnDyZMeieCRT0nWCqRRwIHnRUzxhe2jDzdm4Xv5Gyd7YP2QhsAzYtDdH0hTH71TFek ued2JgS5WeWzx4CaWHOyfxvvb8++qvYyV3PMvM2seh2KEl4bAIGgRQLsaybqehmjJ3MC nr51+peu7vCqP28JsKzqKeZ88O07B1iQYCyaTgHk3KoNBVgkum1husz8QxtUnW05x7de VqzQ== X-Gm-Message-State: AOAM532CjnmVqowJThrP/x6PFkEnxe8KySdNQJuvalfGmXhdsxg8hYrP p80j8UWQaf5Vvxt70uymKBs= X-Received: by 2002:a17:90a:670a:: with SMTP id n10mr15081646pjj.101.1615570599284; Fri, 12 Mar 2021 09:36:39 -0800 (PST) Received: from localhost.localdomain ([103.248.31.144]) by smtp.googlemail.com with ESMTPSA id l10sm180045pfc.125.2021.03.12.09.36.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:36:38 -0800 (PST) From: ameynarkhede03@gmail.com To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, alex.williamson@redhat.com, raphael.norwitz@nutanix.com, Amey Narkhede Subject: [PATCH 0/4] Expose and manage PCI device reset Date: Fri, 12 Mar 2021 23:04:48 +0530 Message-Id: <20210312173452.3855-1-ameynarkhede03@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amey Narkhede PCI and PCIe devices may support a number of possible reset mechanisms for example Function Level Reset (FLR) provided via Advanced Feature or PCIe capabilities, Power Management reset, bus reset, or device specific reset. Currently the PCI subsystem creates a policy prioritizing these reset methods which provides neither visibility nor control to userspace. Expose the reset methods available per device to userspace, via sysfs and allow an administrative user or device owner to have ability to manage per device reset method priorities or exclusions. This feature aims to allow greater control of a device for use cases as device assignment, where specific device or platform issues may interact poorly with a given reset method, and for which device specific quirks have not been developed. Suggested-by: Alex Williamson Reviewed-by: Alex Williamson Reviewed-by: Raphael Norwitz Amey Narkhede (4): PCI: Refactor pcie_flr to follow calling convention of other reset methods PCI: Add new bitmap for keeping track of supported reset mechanisms PCI: Remove reset_fn field from pci_dev PCI/sysfs: Allow userspace to query and set device reset mechanism Documentation/ABI/testing/sysfs-bus-pci | 15 ++ drivers/crypto/cavium/nitrox/nitrox_main.c | 4 +- drivers/crypto/qat/qat_common/adf_aer.c | 2 +- drivers/infiniband/hw/hfi1/chip.c | 4 +- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- .../ethernet/cavium/liquidio/lio_vf_main.c | 4 +- .../ethernet/cavium/liquidio/octeon_mailbox.c | 2 +- drivers/net/ethernet/freescale/enetc/enetc.c | 2 +- .../ethernet/freescale/enetc/enetc_pci_mdio.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 +- drivers/pci/pci-sysfs.c | 68 +++++++- drivers/pci/pci.c | 160 ++++++++++-------- drivers/pci/pci.h | 11 +- drivers/pci/pcie/aer.c | 12 +- drivers/pci/probe.c | 4 +- drivers/pci/quirks.c | 17 +- include/linux/pci.h | 17 +- 17 files changed, 213 insertions(+), 117 deletions(-) -- 2.30.2