X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;fp=resources%2Flibraries%2Fpython%2FInterfaceUtil.py;h=4cd7cf10b69b0d925c2030ed5e9daa982d6fb43d;hp=af34c6450110a2d408cddaa405e8c29af144dc41;hb=7d849ba64e10b8a7678845ee1dcc091e125dd124;hpb=324f01417f17a5347c102179f3d2277a77b116ce diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py index af34c64501..4cd7cf10b6 100644 --- a/resources/libraries/python/InterfaceUtil.py +++ b/resources/libraries/python/InterfaceUtil.py @@ -1828,8 +1828,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)