24 lines
674 B
Bash
24 lines
674 B
Bash
#!/bin/sh
|
|
#
|
|
# Unbind ehci_hcd driver. Fixes suspend on Asus A52J
|
|
#
|
|
TMPLIST=/tmp/ehci-dev-list
|
|
|
|
case "${1}" in
|
|
hibernate|suspend)
|
|
echo -n '' > $TMPLIST
|
|
for i in `ls /sys/bus/pci/drivers/ehci_hcd/ | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do
|
|
# Unbind ehci_hcd for first device XXXX:XX:XX.X:
|
|
echo -n "$i" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
|
|
echo "$i" >> $TMPLIST
|
|
done
|
|
;;
|
|
resume|thaw)
|
|
for i in `cat $TMPLIST`; do
|
|
# Bind ehci_hcd for first device XXXX:XX:XX.X:
|
|
echo -n "$i" | tee /sys/bus/pci/drivers/ehci_hcd/bind
|
|
done
|
|
rm $TMPLIST
|
|
;;
|
|
esac
|