Skip to content

Commit

Permalink
Address few review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolam committed Jan 8, 2025
1 parent dffb637 commit f8490d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/reboot_smartswitch_helper
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function pci_reattach_module()
python3 -c "from utilities_common.module import ModuleHelper; helper = ModuleHelper(); helper.pci_reattach_module('${DPU_NAME}')"
if [ $? -ne 0 ]; then
log_message "Error: PCI reattach vendor API is not available"
echo 1 > /sys/bus/pci/rescan
echo 1 > /sys/bus/pci/devices/${DPU_BUS_INFO}/rescan
fi
}

Expand Down
4 changes: 4 additions & 0 deletions utilities_common/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def reboot_module(self, module_name, reboot_type):
def pci_detach_module(self, module_name):
"""
Detach the specified module by invoking the platform API.
Note: Caller to make sure this method is not invoked concurrently with
pci_reattach_module for the same module.
Args:
module_name (str): The name of the module to detach.
Expand Down Expand Up @@ -103,6 +105,8 @@ def pci_detach_module(self, module_name):
def pci_reattach_module(self, module_name):
"""
Rescan the specified module by invoking the platform API.
Note: Caller to make sure this method is not invoked concurrently with
pci_detach_module for the same module.
Args:
module_name (str): The name of the module to rescan.
Expand Down

0 comments on commit f8490d2

Please sign in to comment.