mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
18 lines
472 B
Bash
Executable file
18 lines
472 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Reset PCI devices like FPGAs after a reflash
|
|
#
|
|
# Author: Steffen Vogel <post@steffenvogel.de>
|
|
# SPDX-FileCopyrightText: 2017 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "usage: $0 BUS:DEV.FNC"
|
|
exit 1
|
|
fi
|
|
|
|
BDF=$1
|
|
|
|
echo "1" > /sys/bus/pci/devices/${BDF}/remove
|
|
echo "1" > /sys/bus/pci/rescan
|
|
echo "1" > /sys/bus/pci/devices/${BDF}/reset
|