From c3e5f0d3591a8dc453b58e0f40ab48cc19b353c2 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 26 Jun 2014 10:38:51 +0200 Subject: [PATCH] busybox: remove 'resume_storage_devices' function from suspend script This was needed to overcome some corner cases with storage devices on suspend/resume using MDEV as device handler. Now we are using UDEV and after some tests done it seems that the 'resume_storage_devices' hack is not needed anymore. Signed-off-by: Javier Viguera --- .../recipes-core/busybox/busybox/suspend | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/meta-digi-dey/recipes-core/busybox/busybox/suspend b/meta-digi-dey/recipes-core/busybox/busybox/suspend index 92094ad5b..756187fd0 100755 --- a/meta-digi-dey/recipes-core/busybox/busybox/suspend +++ b/meta-digi-dey/recipes-core/busybox/busybox/suspend @@ -3,7 +3,7 @@ # # suspend # -# Copyright (C) 2009-2013 by Digi International Inc. +# Copyright (C) 2009-2014 by Digi International Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or modify it @@ -43,32 +43,6 @@ suspend_interfaces() { fi } -resume_storage_devices() { - # remove disk devices and run coldplug mdev to scan for nodes in - # case any device was plugged while the system was suspended - rm -f /dev/sd[a-z] /dev/mmcblk[0-9] && mdev -s - - # for partition nodes fire hotplug ADD event or umount file system - # in case the real hardware is not present - for i in /dev/sd[a-z][0-9]* /dev/mmcblk[0-9]p[0-9]*; do - [ "${i}" = "/dev/sd[a-z][0-9]*" ] && continue - [ "${i}" = "/dev/mmcblk[0-9]p[0-9]*" ] && continue - - dev_path=$(ls -d /sys/block/*/${i#/dev/} 2>/dev/null) - if [ -f "${dev_path}/uevent" ]; then - printf "add" > ${dev_path}/uevent - else - if grep -q "${i}[[:blank:]]" /proc/mounts; then - mdir=$(sed -ne "s,${i}[[:blank:]]\+\([^[:blank:]]\+\)[[:blank:]].*,\1,g;T;p" /proc/mounts) - umount "${mdir}" - rmdir -- "${mdir}" 2>/dev/null - rm -f "${i}" - fi - fi - - done -} - resume_interfaces() { # 'wlan0' interface on some platforms (ccwmx5xjs, cwme9210, ccardwmx28js) # has problems on suspend-resume, so we workaround it by bringing the @@ -103,7 +77,6 @@ if [ -f "${syspower}" ]; then sleep .5 # Post-resume actions - resume_storage_devices resume_interfaces resume_system_time else