From patchwork Thu Jul 10 13:03:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Vrabel X-Patchwork-Id: 4523551 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E94E7BEEAA for ; Thu, 10 Jul 2014 13:03:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00751202F0 for ; Thu, 10 Jul 2014 13:03:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04C5E201F7 for ; Thu, 10 Jul 2014 13:03:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753724AbaGJNDh (ORCPT ); Thu, 10 Jul 2014 09:03:37 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:32448 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753721AbaGJNDg (ORCPT ); Thu, 10 Jul 2014 09:03:36 -0400 X-IronPort-AV: E=Sophos;i="5.01,637,1400025600"; d="scan'208";a="151641035" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 10 Jul 2014 13:03:27 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Thu, 10 Jul 2014 09:03:26 -0400 Received: from qabil.uk.xensource.com ([10.80.2.76]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1X5E0T-0006fy-Ly; Thu, 10 Jul 2014 14:03:25 +0100 From: David Vrabel To: CC: David Vrabel , Bjorn Helgaas , , Konrad Rzeszutek Wilk , Boris Ostrovsky Subject: [PATCH 1/2] pci: export pci_probe_reset_function() Date: Thu, 10 Jul 2014 14:03:13 +0100 Message-ID: <1404997394-15715-2-git-send-email-david.vrabel@citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1404997394-15715-1-git-send-email-david.vrabel@citrix.com> References: <1404997394-15715-1-git-send-email-david.vrabel@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 xen-pciback needs to test if a per-function reset is available so it can provide an interface for a safe bus reset instead. Signed-off-by: David Vrabel --- drivers/pci/pci.c | 1 + drivers/pci/pci.h | 1 - include/linux/pci.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 63a54a3..950e517 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3459,6 +3459,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/drivers/pci/pci.h b/drivers/pci/pci.h index 0601890..7be87d4 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -28,7 +28,6 @@ enum pci_mmap_api { int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vmai, enum pci_mmap_api mmap_api); #endif -int pci_probe_reset_function(struct pci_dev *dev); /** * struct pci_platform_pm_ops - Firmware PM callbacks diff --git a/include/linux/pci.h b/include/linux/pci.h index 466bcd1..a2d9871f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -968,6 +968,7 @@ int pcie_get_mps(struct pci_dev *dev); int pcie_set_mps(struct pci_dev *dev, int mps); int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, enum pcie_link_width *width); +int pci_probe_reset_function(struct pci_dev *slot); int __pci_reset_function(struct pci_dev *dev); int __pci_reset_function_locked(struct pci_dev *dev); int pci_reset_function(struct pci_dev *dev);