aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-12-03 21:47:37 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2014-05-23 12:33:43 -0400
commit8be9df6d4b6b53112abb078cb58827767471d797 (patch)
treec052d5053b9aa8bf5968149170207393249c57e5
parentfcb8ce968fb5d476cbb3f1547ade0c05fc2f6c59 (diff)
xen-pciback: Document when we FLR an PCI device.
When the toolstack wants us to drop or add an PCI device it changes the XenBus state to Configuring - and as result of that we find out which devices we should still be exporting out and which ones not. For the ones we don't need anymore we need to do an PCI reset so that it is ready for the next guest. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: David Vrabel <david.vrabel@citrix.com>
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c2
-rw-r--r--drivers/xen/xen-pciback/xenbus.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index 36dd4f3685f0..b84426a7f88d 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -551,6 +551,8 @@ static void pcistub_remove(struct pci_dev *dev)
551 pr_warn("****** shutdown driver domain before binding device\n"); 551 pr_warn("****** shutdown driver domain before binding device\n");
552 pr_warn("****** to other drivers or domains\n"); 552 pr_warn("****** to other drivers or domains\n");
553 553
554 /* N.B. This ends up calling pcistub_put_pci_dev which ends up
555 * doing the FLR. */
554 xen_pcibk_release_pci_dev(found_psdev->pdev, 556 xen_pcibk_release_pci_dev(found_psdev->pdev,
555 found_psdev->dev); 557 found_psdev->dev);
556 } 558 }
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
index a9ed867afaba..4a7e6e0a5f4c 100644
--- a/drivers/xen/xen-pciback/xenbus.c
+++ b/drivers/xen/xen-pciback/xenbus.c
@@ -93,6 +93,8 @@ static void free_pdev(struct xen_pcibk_device *pdev)
93 93
94 xen_pcibk_disconnect(pdev); 94 xen_pcibk_disconnect(pdev);
95 95
96 /* N.B. This calls pcistub_put_pci_dev which does the FLR on all
97 * of the PCIe devices. */
96 xen_pcibk_release_devices(pdev); 98 xen_pcibk_release_devices(pdev);
97 99
98 dev_set_drvdata(&pdev->xdev->dev, NULL); 100 dev_set_drvdata(&pdev->xdev->dev, NULL);
@@ -286,6 +288,8 @@ static int xen_pcibk_remove_device(struct xen_pcibk_device *pdev,
286 dev_dbg(&dev->dev, "unregistering for %d\n", pdev->xdev->otherend_id); 288 dev_dbg(&dev->dev, "unregistering for %d\n", pdev->xdev->otherend_id);
287 xen_unregister_device_domain_owner(dev); 289 xen_unregister_device_domain_owner(dev);
288 290
291 /* N.B. This ends up calling pcistub_put_pci_dev which ends up
292 * doing the FLR. */
289 xen_pcibk_release_pci_dev(pdev, dev); 293 xen_pcibk_release_pci_dev(pdev, dev);
290 294
291out: 295out: