diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2014-12-03 16:40:28 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-12-04 07:41:59 -0500 |
commit | b5d512147aecc11ba8ecc62f4083f5a9f86d332f (patch) | |
tree | f6c4db5e4e9bcfc9b8cba1c43cc1e29149d667c9 /drivers/xen | |
parent | ac8010221d3fa8697151dfe9a1bb2c504adc68c1 (diff) |
xen/pciback: Include the domain id if removing the device whilst still in use
Cleanup the function a bit - also include the id of the
domain that is using the device.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xen-pciback/pci_stub.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c index 8b77089eddac..e5ff09d8a242 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c | |||
@@ -553,12 +553,14 @@ static void pcistub_remove(struct pci_dev *dev) | |||
553 | spin_unlock_irqrestore(&pcistub_devices_lock, flags); | 553 | spin_unlock_irqrestore(&pcistub_devices_lock, flags); |
554 | 554 | ||
555 | if (found_psdev) { | 555 | if (found_psdev) { |
556 | dev_dbg(&dev->dev, "found device to remove - in use? %p\n", | 556 | dev_dbg(&dev->dev, "found device to remove %s\n", |
557 | found_psdev->pdev); | 557 | found_psdev->pdev ? "- in-use" : ""); |
558 | 558 | ||
559 | if (found_psdev->pdev) { | 559 | if (found_psdev->pdev) { |
560 | pr_warn("****** removing device %s while still in-use! ******\n", | 560 | int domid = xen_find_device_domain_owner(dev); |
561 | pci_name(found_psdev->dev)); | 561 | |
562 | pr_warn("****** removing device %s while still in-use by domain %d! ******\n", | ||
563 | pci_name(found_psdev->dev), domid); | ||
562 | pr_warn("****** driver domain may still access this device's i/o resources!\n"); | 564 | pr_warn("****** driver domain may still access this device's i/o resources!\n"); |
563 | pr_warn("****** shutdown driver domain before binding device\n"); | 565 | pr_warn("****** shutdown driver domain before binding device\n"); |
564 | pr_warn("****** to other drivers or domains\n"); | 566 | pr_warn("****** to other drivers or domains\n"); |