All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: <linux-pci@vger.kernel.org>
Cc: David Vrabel <david.vrabel@citrix.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	<xen-devel@lists.xenproject.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: [PATCH 1/2] pci: export pci_probe_reset_function()
Date: Thu, 10 Jul 2014 14:03:13 +0100	[thread overview]
Message-ID: <1404997394-15715-2-git-send-email-david.vrabel@citrix.com> (raw)
In-Reply-To: <1404997394-15715-1-git-send-email-david.vrabel@citrix.com>

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 <david.vrabel@citrix.com>
---
 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);
-- 
1.7.10.4


  reply	other threads:[~2014-07-10 13:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 13:03 [PATCHv1 0/2] xen-pciback: allow device reset to work more often David Vrabel
2014-07-10 13:03 ` David Vrabel [this message]
2014-07-10 13:03 ` [PATCH 1/2] pci: export pci_probe_reset_function() David Vrabel
2014-07-10 13:03 ` [PATCH 2/2] xen-pciback: provide a "reset" sysfs file to try harder at an SBR David Vrabel
2014-07-10 23:14   ` Alex Williamson
2014-07-10 23:14   ` Alex Williamson
2014-07-11  9:53     ` David Vrabel
2014-07-11 13:45       ` Konrad Rzeszutek Wilk
2014-07-11 13:45       ` Konrad Rzeszutek Wilk
2014-07-11 14:29       ` Alex Williamson
2014-07-11 14:29       ` Alex Williamson
2014-07-11  9:53     ` David Vrabel
2014-07-10 13:03 ` David Vrabel
2014-07-10 16:25 ` [PATCHv1 0/2] xen-pciback: allow device reset to work more often Bjorn Helgaas
2014-07-10 16:25 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1404997394-15715-2-git-send-email-david.vrabel@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=bhelgaas@google.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.