hv: vpci: remove is_own_device()

Now we could know a device status by 'user' filed, like

---------------------------------------------------------------------------
           | NULL              | == vdev           | != NULL && != vdev
vdev->user | device is de-init | used by itself VM | assigned to another VM
---------------------------------------------------------------------------

So we don't need to modify 'vpci' field accordingly.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong<eddie.dong@Intel.com>
This commit is contained in:
Li Fei1
2020-05-12 14:45:57 +08:00
committed by wenlingz
parent af8329394b
commit 15e3062631
4 changed files with 9 additions and 26 deletions

View File

@@ -208,7 +208,6 @@ static void enable_vfs(struct pci_vdev *pf_vdev)
} else {
/* Re-activate a zombie VF */
if (is_zombie_vf(vf_vdev)) {
vf_vdev->vpci = pf_vdev->vpci;
vf_vdev->vdev_ops->init_vdev(vf_vdev);
}
}
@@ -252,7 +251,6 @@ static void disable_vfs(struct pci_vdev *pf_vdev)
if ((vf_vdev != NULL) && (!is_zombie_vf(vf_vdev))) {
/* set disabled VF as zombie vdev instance */
vf_vdev->vdev_ops->deinit_vdev(vf_vdev);
vf_vdev->vpci = NULL;
}
}
}