summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2014-04-22 10:48:17 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2014-05-23 12:33:55 -0400
commit0a9fd0152929db372ff61b0d6c280fdd34ae8bdb (patch)
treedf20160955d35fe46d95b451595c2c87f59ce43d /drivers/xen
parent24d8bf1b0a12a92171c6f08a665c6ff3f0788c91 (diff)
downloadlinux-0a9fd0152929db372ff61b0d6c280fdd34ae8bdb.tar.bz2
xen/pciback: Document the entry points for 'pcistub_put_pci_dev'
which are quite a few. It should be evident that dealing with that many options is a bit complex. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index 1539becad139..d57a173685f3 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -242,6 +242,15 @@ struct pci_dev *pcistub_get_pci_dev(struct xen_pcibk_device *pdev,
return found_dev;
}
+/*
+ * Called when:
+ * - XenBus state has been reconfigure (pci unplug). See xen_pcibk_remove_device
+ * - XenBus state has been disconnected (guest shutdown). See xen_pcibk_xenbus_remove
+ * - 'echo BDF > unbind' on pciback module with no guest attached. See pcistub_remove
+ * - 'echo BDF > unbind' with a guest still using it. See pcistub_remove
+ *
+ * As such we have to be careful.
+ */
void pcistub_put_pci_dev(struct pci_dev *dev)
{
struct pcistub_device *psdev, *found_psdev = NULL;