From patchwork Thu Apr 9 15:51:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 6188821 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 35F469F2E9 for ; Thu, 9 Apr 2015 15:51:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A6952035B for ; Thu, 9 Apr 2015 15:51:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6C41820364 for ; Thu, 9 Apr 2015 15:51:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755632AbbDIPvq (ORCPT ); Thu, 9 Apr 2015 11:51:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51548 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755461AbbDIPvp (ORCPT ); Thu, 9 Apr 2015 11:51:45 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t39Fpi6h028591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 9 Apr 2015 11:51:44 -0400 Received: from gimli.home (ovpn-113-40.phx2.redhat.com [10.3.113.40]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t39Fph6O012142; Thu, 9 Apr 2015 11:51:43 -0400 Subject: [PATCH] PCI: Export pci_probe_reset_function() From: Alex Williamson To: linux-pci@vger.kernel.org Cc: bhelgaas@google.com, linux-kernel@vger.kernel.org Date: Thu, 09 Apr 2015 09:51:43 -0600 Message-ID: <20150409155100.6891.72838.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The equivalent bus and slot versions of this are already exported and vfio-pci would like a function-probe available so we can expose function-level reset capabilities to the user without necessarily using it to perform a reset before enabling the device for the user. Signed-off-by: Alex Williamson Acked-by: Bjorn Helgaas --- drivers/pci/pci.c | 1 + include/linux/pci.h | 1 + 2 files changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 81f06e8..9f3e691 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3524,6 +3524,7 @@ int pci_probe_reset_function(struct pci_dev *dev) { return pci_dev_reset(dev, 1); } +EXPORT_SYMBOL_GPL(pci_probe_reset_function); /** * pci_reset_function - quiesce and reset a PCI device function diff --git a/include/linux/pci.h b/include/linux/pci.h index 211e9da..233d1ae 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -986,6 +986,7 @@ int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, enum pcie_link_width *width); int __pci_reset_function(struct pci_dev *dev); int __pci_reset_function_locked(struct pci_dev *dev); +int pci_probe_reset_function(struct pci_dev *dev); int pci_reset_function(struct pci_dev *dev); int pci_try_reset_function(struct pci_dev *dev); int pci_probe_reset_slot(struct pci_slot *slot);