From 97309d3974fd371920cc8b932e2b6b5e4100c7c6 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Wed, 4 Jan 2012 14:10:32 -0500 Subject: xen/pciback: Move the PCI_DEV_FLAGS_ASSIGNED ops to the "[un|]bind" operation instead of doing it per guest creation/disconnection. Without this we could have potentially unloaded the vf driver from the xen pciback control even if the driver was binded to the xen-pciback. This will hold on to it until the user "unbind"s the PCI device using SysFS. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/xen-pciback/xenbus.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/xen/xen-pciback/xenbus.c') diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c index c80f9c84d08e..87c5dc3368d0 100644 --- a/drivers/xen/xen-pciback/xenbus.c +++ b/drivers/xen/xen-pciback/xenbus.c @@ -241,7 +241,6 @@ static int xen_pcibk_export_device(struct xen_pcibk_device *pdev, goto out; dev_dbg(&dev->dev, "registering for %d\n", pdev->xdev->otherend_id); - dev->dev_flags |= PCI_DEV_FLAGS_ASSIGNED; if (xen_register_device_domain_owner(dev, pdev->xdev->otherend_id) != 0) { dev_err(&dev->dev, "device has been assigned to another " \ @@ -281,7 +280,6 @@ static int xen_pcibk_remove_device(struct xen_pcibk_device *pdev, } dev_dbg(&dev->dev, "unregistering for %d\n", pdev->xdev->otherend_id); - dev->dev_flags &= ~PCI_DEV_FLAGS_ASSIGNED; xen_unregister_device_domain_owner(dev); xen_pcibk_release_pci_dev(pdev, dev); -- cgit v1.2.3-59-g8ed1b