BUSES="0000:00:1a.0 0000:00:1d.0"

case "${1}" in
hibernate|suspend)
# Switch USB buses off
for bus in $BUSES; do
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/unbind
done
;;
resume|thaw)
# Switch USB buses back on
for bus in $BUSES; do
echo -n $bus | tee /sys/bus/pci/drivers/ehci_hcd/bind
done
;;
esac
