summaryrefslogtreecommitdiffstats
path: root/tests/reload.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-05-06 06:38:46 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-05-06 06:38:46 +0200
commit38237d1ecc756130bacd0f2e12659ad54d2d6544 (patch)
tree164c65699834e80f1e882587a5bcbf691dce1a9d /tests/reload.sh
parentb9a1af8a3b03a5e8575d87c3593a5931cd0e7a8c (diff)
downloadpcitool-38237d1ecc756130bacd0f2e12659ad54d2d6544.tar.gz
pcitool-38237d1ecc756130bacd0f2e12659ad54d2d6544.tar.bz2
pcitool-38237d1ecc756130bacd0f2e12659ad54d2d6544.tar.xz
pcitool-38237d1ecc756130bacd0f2e12659ad54d2d6544.zip
Add forgotten ipe_benchmark.c
Diffstat (limited to 'tests/reload.sh')
-rwxr-xr-xtests/reload.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/reload.sh b/tests/reload.sh
new file mode 100755
index 0000000..62c6e22
--- /dev/null
+++ b/tests/reload.sh
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+device=`lspci -n | grep -m 1 "10ee:" | awk '{print $1}'`
+if [ -z "$device" ]; then
+ echo "Xilinx device doesn't exist, rescanning..."
+ echo 1 > /sys/bus/pci/rescan
+ exit
+else
+ echo "Xilinx is located at: " $device
+fi
+echo "remove driver"
+rmmod pciDriver
+echo "remove devices"
+echo 1 > /sys/bus/pci/devices/0000\:${device:0:2}\:${device:3:4}/remove
+sleep 1
+echo "rescan"
+echo 1 > /sys/bus/pci/rescan
+sleep 1
+echo "instantiate driver"
+modprobe pciDriver
+# for devices with different ID
+#echo "10ee 6028" > /sys/bus/pci/drivers/pciDriver/new_id
+pci -i
+#echo Enabling bus mastering on device $dev
+#setpci -s $device 4.w=0x07