X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;fp=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;h=c50593ce6c42ac9b3ce6d2afe3e41c2d86d30e15;hb=749c0f178b03ff57df405dcb91139d1eacbf7019;hp=c1c03aacb3a713473a66fb20b13e275b844e2b70;hpb=a431c1f6fd0fcd03c4e1cd2da1d5346d000b1e30;p=csit.git diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index c1c03aacb3..c50593ce6c 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -1829,8 +1829,9 @@ class InterfaceUtil: # PCI device must be re-bound to kernel driver before creating VFs. DUTSetup.verify_kernel_module(node, kernel_driver, force_load=True) # Stop VPP to prevent deadlock. - # Unbind from current driver. - DUTSetup.pci_driver_unbind(node, pf_pci_addr) + # Unbind from current driver if bound. + if current_driver: + DUTSetup.pci_driver_unbind(node, pf_pci_addr) # Bind to kernel driver. DUTSetup.pci_driver_bind(node, pf_pci_addr, kernel_driver)