I do not think that an user who has created this script in /etc/pm/sleep.d will have any doubt, but if you care about it :
Code:
#!/bin/sh
EHCI_BUSES="0000:00:1a.0 0000:00:1d.0"
case "${1}" in
hibernate|suspend)
# Switch USB buses off
for bus in $EHCI_BUSES; do
echo -n $bus > /sys/bus/pci/drivers/ehci_hcd/unbind
done
;;
resume|thaw)
# Switch USB buses back on
for bus in $EHCI_BUSES; do
echo -n $bus > /sys/bus/pci/drivers/ehci_hcd/bind
done
;;
esac
It was designed for an Asus K43SA but I migrated my hard disk to a ThinkPad X220 without USB 3. I forgot to delete it, without any consequence before kernel 3.8.