[dahdi-commits] tzafrir: branch tools/2.3 r8963 - in /tools/branches/2.3: ./ xpp/xpp_fxloader
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Wed Jul 21 10:56:20 CDT 2010
Author: tzafrir
Date: Wed Jul 21 10:56:17 2010
New Revision: 8963
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8963
Log:
xpp_fxloader: replace a sleep with a sleep loop
For newer kernels there's no need to sleep at all. For Centos5 systems
there seems to be a need for a large sleep for firmware load at boot time.
So let's make it a loop.
Merged revisions 8951 via svnmerge from
http://svn.digium.com/svn/dahdi/tools/trunk
Modified:
tools/branches/2.3/ (props changed)
tools/branches/2.3/xpp/xpp_fxloader
Propchange: tools/branches/2.3/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jul 21 10:56:17 2010
@@ -1,1 +1,1 @@
-/tools/trunk:1-8509,8528-8529,8535,8580,8589,8630,8638,8741,8827,8854,8923-8924,8954
+/tools/trunk:1-8509,8528-8529,8535,8580,8589,8630,8638,8741,8827,8854,8923-8924,8951,8954
Modified: tools/branches/2.3/xpp/xpp_fxloader
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.3/xpp/xpp_fxloader?view=diff&rev=8963&r1=8962&r2=8963
==============================================================================
--- tools/branches/2.3/xpp/xpp_fxloader (original)
+++ tools/branches/2.3/xpp/xpp_fxloader Wed Jul 21 10:56:17 2010
@@ -67,7 +67,7 @@
FIRMWARE_DIR="${FIRMWARE_DIR:-/usr/share/dahdi}"
ASTRIBANK_HEXLOAD=${ASTRIBANK_HEXLOAD:-/usr/sbin/astribank_hexload}
ASTRIBANK_TOOL=${ASTRIBANK_TOOL:-/usr/sbin/astribank_tool}
-XPP_UDEV_SLEEP_TIME="${XPP_UDEV_SLEEP_TIME:-1}"
+XPP_UDEV_SLEEP_TIME="${XPP_UDEV_SLEEP_TIME:-5}"
USB_FW="${USB_FW:-USB_FW.hex}"
@@ -325,9 +325,18 @@
# On some systems (e.g. CentOS 5) we get the relevant udev event before the device
# file is ready. Which is why we want the background process to wait a bit first.
udev_delayed_load() {
+ sleep 0.2
# Make sure the new device is writable:
- sleep "$XPP_UDEV_SLEEP_TIME"
- if [ ! -w "$DEVICE" ]; then
+ usb_dev_writable=0
+ for i in `seq $XPP_UDEV_SLEEP_TIME`; do
+ if [ -w "$DEVICE" ]; then
+ usb_dev_writable=1;
+ break;
+ fi
+ sleep 1
+ done
+ if [ $usb_dev_writable != 1 ]; then
+ $LOGGER "Device $DEVICE not writable. Can't load firmware."
return;
fi
More information about the dahdi-commits
mailing list