From bd0482fc96d87e6a64f42e1d31ec090891a749bb Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Wed, 26 Feb 2020 12:21:36 -0800 Subject: [PATCH] Update script for sysfs changes --- scripts/pcie_hot_reset.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/pcie_hot_reset.sh b/scripts/pcie_hot_reset.sh index caf77b3..18c178f 100755 --- a/scripts/pcie_hot_reset.sh +++ b/scripts/pcie_hot_reset.sh @@ -40,6 +40,10 @@ sleep 0.5 echo "Rescanning bus..." -echo 1 > "/sys/bus/pci/devices/$port/rescan" +if [ -e "/sys/bus/pci/devices/$port/dev_rescan" ]; then + echo 1 > "/sys/bus/pci/devices/$port/dev_rescan" +else + echo 1 > "/sys/bus/pci/devices/$port/rescan" +fi