xpp: xpp_fxloader: regressions from r10348

* Avoid a duplicated run of udev on some systems.
* Fix usage of astribank_tool's output.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10366 17933a7a-c749-41c5-a318-cba88f637d49
This commit is contained in:
Tzafrir Cohen 2011-12-04 15:33:21 +00:00
parent 03c0afef41
commit 32b715d373

View File

@ -278,11 +278,12 @@ load_fw_device() {
echo_file="$FIRMWARE_DIR/OCT6104E-256D.ima" echo_file="$FIRMWARE_DIR/OCT6104E-256D.ima"
law='' law=''
law_str='uLaw' law_str='uLaw'
card_type=`run_astribank_tool -D "$dev" -Q 2>&1 | grep 'CARD 4' | sed -e 's/.*type=//' -e 's/\..*//'` abtool_output=`$ASTRIBANK_TOOL -D "$dev" -Q 2>&1`
caps_num=`run_astribank_tool -D "$dev" -Q 2>&1 | grep 'ECHO ports' | sed -e 's/.*: *//'` ec_card_type=`echo "$abtool_output" | grep 'CARD 4' | sed -e 's/.*type=//' -e 's/\..*//'`
if [ $card_type -eq 5 ]; then caps_num=`echo "$abtool_output" | grep 'ECHO ports' | sed -e 's/.*: *//'`
if [ "$ec_card_type" = '5' ]; then
debug "ECHO burning into $dev: $echo_file" debug "ECHO burning into $dev: $echo_file"
card_type=`run_astribank_tool -D "$dev" -Q 2>&1 | grep 'CARD 0' | sed -e 's/.*type=//' -e 's/\..*//'` card_type=`echo "$abtool_output" | grep 'CARD 0' | sed -e 's/.*type=//' -e 's/\..*//'`
case "$card_type" in case "$card_type" in
3) law="-A";; 3) law="-A";;
4) 4)
@ -541,6 +542,9 @@ udev_delayed_load() {
usb_firmware_device "$PRODUCT" "$DEVICE" usb_firmware_device "$PRODUCT" "$DEVICE"
;; ;;
e4e4/11[3456]1/*) e4e4/11[3456]1/*)
# There are potentially two separate udev events, for
# each of the two endpoints. Ignore the first interface:
case "$DEVPATH" in *.0) exit 0;; esac
sleep_if_race sleep_if_race
fpga_firmware_device "$PRODUCT" "$DEVICE" & fpga_firmware_device "$PRODUCT" "$DEVICE" &
wait # parallel firmware loading wait # parallel firmware loading