If you have a watchdog on your system and a driver that uses /dev/watchdog
, all you have to do is kill the process that is feeding it; if there is no such process, then you can touch /dev/watchdog
once to turn it on, and if you don't touch it again, it will reset.
You also might be interested in resetting the device using the "magic sysrq" way. If you have a kernel with the CONFIG_MAGIC_SYSRQ
feature compiled in, then you can echo 1 > /proc/sys/kernel/sysrq
to enable it, then echo b > /proc/sysrq-trigger
to reboot. When you do this, it reboots immediately, without unmounting or or syncing filesystems.
Potential Method #1
I think you can do it with these commands:
disable
echo 0 > /sys/bus/pci/slots/$NUMBER/power
enable
echo 1 > /sys/bus/pci/slots/$NUMBER/power
Where $NUMBER
is the number of the PCI slot.
lspci -vv
may help to identify the device. This is not very well documented...
Potential Method #2
I came across this thread on U&L, similar issue: there are some answers to that question that say you can reset with this command:
echo "1" > /sys/bus/pci/devices/$NUMBER/reset
However, I would read the answers there! There are conditions around doing it this way! Specifically I would read this answer!
Potential Method #3
There is a Unix command, setpci
, that may give you a method for resetting a device in the PCI bus.
I did not see any specific examples with this command so you'll have to google for examples and look through the man page. I would tread lightly with this command until you're confident in it's use. From what I've read about it, it's manipulating the hardware directly and so there are always risks in doing it yourself vs. using a tool that is exposing this type of functionality!
Best Answer
according to http://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-pci you can reset individual functions of the device if that's supported: