From bcc39e4e73d367178a542540935457c8051df7fe Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Tue, 1 Apr 2025 12:39:59 +0200 Subject: feat(core): Bind/unbind Signed-off-by: Peter Mikus Change-Id: I7e1398b110356ae5682db3e1b811bc1bbe41398e --- resources/libraries/python/DUTSetup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'resources/libraries/python/DUTSetup.py') diff --git a/resources/libraries/python/DUTSetup.py b/resources/libraries/python/DUTSetup.py index 8c240d9735..1f5a48aeda 100644 --- a/resources/libraries/python/DUTSetup.py +++ b/resources/libraries/python/DUTSetup.py @@ -1,4 +1,4 @@ -# Copyright (c) 2024 Cisco and/or its affiliates. +# Copyright (c) 2025 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -392,7 +392,9 @@ class DUTSetup: :type pci_addrs: list """ for pci_addr in pci_addrs: - DUTSetup.pci_driver_unbind(node, pci_addr) + cur_driver = DUTSetup.get_pci_dev_driver(node, pci_addr) + if cur_driver: + DUTSetup.pci_driver_unbind(node, pci_addr) DUTSetup.pci_driver_bind(node, pci_addr, driver) @staticmethod -- cgit