3 # Bind all unused PCI devices bound to uio drivers
4 # back to default kernel driver
6 if [ $USER != "root" ] ; then
7 echo "Restarting script with sudo..."
12 for f in /sys/bus/pci/drivers/{igb_uio,uio_pci_generic,vfio-pci}/*; do
13 [ -e ${f}/config ] || continue
14 fuser -s ${f}/config && continue
19 [ -n ${removed} ] && echo 1 > /sys/bus/pci/rescan