aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Erculiani <lxnay@sabayon.org>2011-01-04 22:33:07 (GMT)
committerSebastian Pipping <sebastian@pipping.org>2011-01-05 14:10:37 (GMT)
commite151596a03089e9863cbe99ff06e411d32f5a3bb (patch)
tree31ba66108005bf1c5d91227a21229fe4da9bd14f
parentAdd minimal btrfs support, as per bug #303529. (diff)
downloadgenkernel-e151596a03089e9863cbe99ff06e411d32f5a3bb.zip
genkernel-e151596a03089e9863cbe99ff06e411d32f5a3bb.tar.gz
genkernel-e151596a03089e9863cbe99ff06e411d32f5a3bb.tar.bz2
Fix "doslowusb" and automatic "slowusb" behaviour.
check_slowusb set FORCE_slowusb even when not strictly necessary, in newer linux kernels, there are more files inside /sys/bus/usb/drivers/usb-storage that have nothing to do with available devices. Moreover, start_dev_mgr was triggering 3 times the sleep() required, calling sdelay more than once.
-rwxr-xr-xdefaults/initrd.scripts12
-rwxr-xr-xdefaults/linuxrc4
2 files changed, 8 insertions, 8 deletions
diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 3cc1de8..447d632 100755
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -411,10 +411,16 @@ setup_hotplug() {
}
check_slowusb() {
+ local usb_storage_dir="/sys/bus/usb/drivers/usb-storage"
+ if [ ! -d "${usb_storage_dir}" ]
+ then
+ return
+ fi
[ "${DO_slowusb}" ] || \
- for dir in /sys/bus/usb/drivers/usb-storage/*
+ for x in "${usb_storage_dir}"/*
do
- [ -d "${dir}" ] && FORCE_slowusb="1"
+ [ -d "${x}" ] && [ "${x}" != "${usb_storage_dir}/module" ] \
+ && FORCE_slowusb="1"
done
}
@@ -422,9 +428,7 @@ start_dev_mgr() {
if [ "${KV_2_6_OR_GREATER}" ]
then
cd /sys
- [ "${DO_slowusb}" ] && sdelay
check_slowusb
- [ "${FORCE_slowusb}" ] && sdelay
good_msg 'Activating mdev'
runmdev
[ "${DO_slowusb}" ] || \
diff --git a/defaults/linuxrc b/defaults/linuxrc
index 3cc1ca2..59f1ea5 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -699,10 +699,6 @@ then
export CDBOOT
CDBOOT=1
check_slowusb
- if [ "${DO_slowusb}" ] || [ "${FORCE_slowusb}" ]
- then
- sleep 10
- fi
else
if [ "${USE_UNIONFS_NORMAL}" = '1' ]
then