From 180da3b590ccbfd0ca316211c42dcdb4b14a106a Mon Sep 17 00:00:00 2001 From: Yalu Zhang <yalu.zhang@iopsys.eu> Date: Wed, 5 Jun 2019 09:48:34 +0200 Subject: [PATCH] Update from UGW-8.1.1.20 From 4.20.1.2 to 4.20.1.2.0 --- ChangeLog | 8 + Makefile.in | 2 +- config.rpath | 666 ++++++++++++++++++++++++++ configure | 20 +- configure.in | 2 +- doc/doxyconfig.vrx | 6 +- src/common/drv_dsl_cpe_api.c | 7 +- src/common/drv_dsl_cpe_autoboot.c | 53 +- src/device/drv_dsl_cpe_msg_vrx.c | 35 +- src/include/drv_dsl_cpe_api.h | 42 +- src/include/drv_dsl_cpe_api_bnd_vrx.h | 2 +- src/include/drv_dsl_cpe_api_config.h | 6 +- src/include/drv_dsl_cpe_api_error.h | 25 +- src/include/drv_dsl_cpe_api_ioctl.h | 71 +-- src/include/drv_dsl_cpe_autoboot.h | 6 +- src/include/drv_dsl_cpe_device_vrx.h | 3 +- src/pm/drv_dsl_cpe_api_pm.c | 34 +- src/pm/drv_dsl_cpe_pm_core.c | 45 +- 18 files changed, 898 insertions(+), 135 deletions(-) create mode 100755 config.rpath diff --git a/ChangeLog b/ChangeLog index 6c8ac4d..123fead 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ NEXT VERSION +V4.20.1.2.0 - 2019-01-15 +common: +- VRX (DSLCPE_SW-1162) Power down handling does not work for ADSL +- VRX (DSLCPE_SW-1097) Message dump printout is not as expected +- VRX (DSLCPE_SW-1142) Integrate fixes/patches for thread handling (PM + Autoboot) +- VRX (DSLCPE_SW-1173) [VRX518][Power Saving] Switching BND->Single +- VRX (UGW_SW-32871) Always send FW configuration message on InstanceControlSet + V4.20.1.2 - 2018-08-16 common: - VRX (DSLCPE_SW-1160) Release of memory within PM initialization sequence diff --git a/Makefile.in b/Makefile.in index a8ef6bd..c65133e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -187,7 +187,7 @@ DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/src/include/drv_dsl_cpe_api_config.h.in \ ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README TODO compile \ - depcomp install-sh missing + config.rpath depcomp install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) diff --git a/config.rpath b/config.rpath new file mode 100755 index 0000000..c547c68 --- /dev/null +++ b/config.rpath @@ -0,0 +1,666 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2007 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 +# +# This file is free software; the Free Software Foundation gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# Known limitations: +# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer +# than 256 bytes, otherwise the compiler driver will dump core. The only +# known workaround is to choose shorter directory names for the build +# directory and/or the installation directory. + +# All known linkers require a `.a' archive for static linking (except MSVC, +# which needs '.lib'). +libext=a +shrext=.so + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix*) + wl='-Wl,' + ;; + darwin*) + case $cc_basename in + xlc*) + wl='-Wl,' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2*) + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6* | nonstopux*) + wl='-Wl,' + ;; + newsos6) + ;; + linux* | k*bsd*-gnu) + case $cc_basename in + icc* | ecc*) + wl='-Wl,' + ;; + pgcc | pgf77 | pgf90) + wl='-Wl,' + ;; + ccc*) + wl='-Wl,' + ;; + como) + wl='-lopt=' + ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; + esac + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + rdos*) + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3*) + wl='-Wl,' + ;; + sysv4*MP*) + ;; + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) + wl='-Wl,' + ;; + unicos*) + wl='-Wl,' + ;; + uts4*) + ;; + esac +fi + +# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we cannot use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + interix[3-9]*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + gnu* | linux* | k*bsd*-gnu) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + netbsd*) + ;; + solaris*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + : + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + ;; + esac + fi + # Begin _LT_AC_SYS_LIBPATH_AIX. + echo 'int main () { return 0; }' > conftest.c + ${CC} ${LDFLAGS} conftest.c -o conftest + aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + if test -z "$aix_libpath"; then + aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` + fi + if test -z "$aix_libpath"; then + aix_libpath="/usr/lib:/lib" + fi + rm -f conftest.c conftest + # End _LT_AC_SYS_LIBPATH_AIX. + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + bsdi[45]*) + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=no + if test "$GCC" = yes ; then + : + else + case $cc_basename in + xlc*) + ;; + *) + ld_shlibs=no + ;; + esac + fi + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd* | dragonfly*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + hpux10*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) + hardcode_direct=no + ;; + *) + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + irix5* | irix6* | nonstopux*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + if test -f /usr/libexec/ld.so; then + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + case $host_vendor in + sni) + hardcode_direct=yes # is this really true??? + ;; + siemens) + hardcode_direct=no + ;; + motorola) + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + ;; + sysv4.3*) + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) + ;; + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. +# Unlike libtool.m4, here we don't care about _all_ names of the library, but +# only about the one the linker finds when passed -lNAME. This is the last +# element of library_names_spec in libtool.m4, or possibly two of them if the +# linker has special search rules. +library_names_spec= # the last element of library_names_spec in libtool.m4 +libname_spec='lib$name' +case "$host_os" in + aix3*) + library_names_spec='$libname.a' + ;; + aix4* | aix5*) + library_names_spec='$libname$shrext' + ;; + amigaos*) + library_names_spec='$libname.a' + ;; + beos*) + library_names_spec='$libname$shrext' + ;; + bsdi[45]*) + library_names_spec='$libname$shrext' + ;; + cygwin* | mingw* | pw32*) + shrext=.dll + library_names_spec='$libname.dll.a $libname.lib' + ;; + darwin* | rhapsody*) + shrext=.dylib + library_names_spec='$libname$shrext' + ;; + dgux*) + library_names_spec='$libname$shrext' + ;; + freebsd1*) + ;; + freebsd* | dragonfly*) + case "$host_os" in + freebsd[123]*) + library_names_spec='$libname$shrext$versuffix' ;; + *) + library_names_spec='$libname$shrext' ;; + esac + ;; + gnu*) + library_names_spec='$libname$shrext' + ;; + hpux9* | hpux10* | hpux11*) + case $host_cpu in + ia64*) + shrext=.so + ;; + hppa*64*) + shrext=.sl + ;; + *) + shrext=.sl + ;; + esac + library_names_spec='$libname$shrext' + ;; + interix[3-9]*) + library_names_spec='$libname$shrext' + ;; + irix5* | irix6* | nonstopux*) + library_names_spec='$libname$shrext' + case "$host_os" in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + ;; + linux*oldld* | linux*aout* | linux*coff*) + ;; + linux* | k*bsd*-gnu) + library_names_spec='$libname$shrext' + ;; + knetbsd*-gnu) + library_names_spec='$libname$shrext' + ;; + netbsd*) + library_names_spec='$libname$shrext' + ;; + newsos6) + library_names_spec='$libname$shrext' + ;; + nto-qnx*) + library_names_spec='$libname$shrext' + ;; + openbsd*) + library_names_spec='$libname$shrext$versuffix' + ;; + os2*) + libname_spec='$name' + shrext=.dll + library_names_spec='$libname.a' + ;; + osf3* | osf4* | osf5*) + library_names_spec='$libname$shrext' + ;; + rdos*) + ;; + solaris*) + library_names_spec='$libname$shrext' + ;; + sunos4*) + library_names_spec='$libname$shrext$versuffix' + ;; + sysv4 | sysv4.3*) + library_names_spec='$libname$shrext' + ;; + sysv4*MP*) + library_names_spec='$libname$shrext' + ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + library_names_spec='$libname$shrext' + ;; + uts4*) + library_names_spec='$libname$shrext' + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +shlibext=`echo "$shrext" | sed -e 's,^\.,,'` +escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF + +# How to pass a linker flag through the compiler. +wl="$escaped_wl" + +# Static library suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally "so"). +shlibext="$shlibext" + +# Format of library name prefix. +libname_spec="$escaped_libname_spec" + +# Library names that the linker finds when passed -lNAME. +library_names_spec="$escaped_library_names_spec" + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="$hardcode_libdir_separator" + +# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the +# resulting binary. +hardcode_direct="$hardcode_direct" + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L="$hardcode_minus_L" + +EOF diff --git a/configure b/configure index 199d5b3..4602f41 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.in Revision: 1.177 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for DSL CPE API driver 4.20.1.2. +# Generated by GNU Autoconf 2.69 for DSL CPE API driver 4.20.1.2.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='DSL CPE API driver' PACKAGE_TARNAME='drv_dsl_cpe_api' -PACKAGE_VERSION='4.20.1.2' -PACKAGE_STRING='DSL CPE API driver 4.20.1.2' +PACKAGE_VERSION='4.20.1.2.0' +PACKAGE_STRING='DSL CPE API driver 4.20.1.2.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1440,7 +1440,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures DSL CPE API driver 4.20.1.2 to adapt to many kinds of systems. +\`configure' configures DSL CPE API driver 4.20.1.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1506,7 +1506,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of DSL CPE API driver 4.20.1.2:";; + short | recursive ) echo "Configuration of DSL CPE API driver 4.20.1.2.0:";; esac cat <<\_ACEOF @@ -1697,7 +1697,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -DSL CPE API driver configure 4.20.1.2 +DSL CPE API driver configure 4.20.1.2.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1752,7 +1752,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by DSL CPE API driver $as_me 4.20.1.2, which was +It was created by DSL CPE API driver $as_me 4.20.1.2.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2618,7 +2618,7 @@ fi # Define the identity of the package. PACKAGE='drv_dsl_cpe_api' - VERSION='4.20.1.2' + VERSION='4.20.1.2.0' cat >>confdefs.h <<_ACEOF @@ -8776,7 +8776,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by DSL CPE API driver $as_me 4.20.1.2, which was +This file was extended by DSL CPE API driver $as_me 4.20.1.2.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8842,7 +8842,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -DSL CPE API driver config.status 4.20.1.2 +DSL CPE API driver config.status 4.20.1.2.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index 8b0682f..cb87843 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ AC_REVISION($Revision: 1.177 $) -AC_INIT([DSL CPE API driver],[4.20.1.2],[],[drv_dsl_cpe_api]) +AC_INIT([DSL CPE API driver],[4.20.1.2.0],[],[drv_dsl_cpe_api]) AC_CONFIG_SRCDIR(src/Makefile.am) AM_INIT_AUTOMAKE([tar-pax]) diff --git a/doc/doxyconfig.vrx b/doc/doxyconfig.vrx index 16b3ae7..048f977 100644 --- a/doc/doxyconfig.vrx +++ b/doc/doxyconfig.vrx @@ -22,7 +22,7 @@ PROJECT_NAME = "DSL CPE API" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 4.20.1.2 +PROJECT_NUMBER = 4.20.1.2.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -988,6 +988,10 @@ PREDEFINED = __PACKED__= \ INCLUDE_DSL_CPE_API_VDSL_SUPPORT:=1 \ INCLUDE_DSL_CPE_API_ADSL_SUPPORT:=0 \ INCLUDE_DSL_CPE_API_VRX \ + DSL_VRX_DEVICE_VR9 \ + DSL_VRX_DEVICE_VR10 \ + DSL_VRX_DEVICE_VR10_320 \ + DSL_VRX_DEVICE_VR11 \ DSL_DOC_GENERATION_EXCLUDE_ADSL_MIB \ DSL_DOC_GENERATION_EXCLUDE_UNWANTED \ INCLUDE_DSL_API_G997 \ diff --git a/src/common/drv_dsl_cpe_api.c b/src/common/drv_dsl_cpe_api.c index 694127c..1391dac 100644 --- a/src/common/drv_dsl_cpe_api.c +++ b/src/common/drv_dsl_cpe_api.c @@ -6869,11 +6869,6 @@ DSL_Error_t DSL_DRV_IoctlHandle( SYS_DBG_ERR"DSL[%02d]: ERROR - VRx NFC set callback failed!" DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); } - else - { - /* Try to send but do not forward error in case of very early cli ics execute */ - DSL_DRV_VRX_SendMsgModemFSMEventConfigure(pContext, bFwEventActivation); - } } else { @@ -6888,6 +6883,8 @@ DSL_Error_t DSL_DRV_IoctlHandle( nErrCode = DSL_ERROR; } } + /* Try to send but do not forward error in case of very early cli ics execute */ + DSL_DRV_VRX_SendMsgModemFSMEventConfigure(pContext, bFwEventActivation); if (DSL_DRV_BONDING_ENABLED && DSL_DRV_LINES_PER_DEVICE == 1) { diff --git a/src/common/drv_dsl_cpe_autoboot.c b/src/common/drv_dsl_cpe_autoboot.c index 7698a3b..4c89633 100644 --- a/src/common/drv_dsl_cpe_autoboot.c +++ b/src/common/drv_dsl_cpe_autoboot.c @@ -577,7 +577,14 @@ DSL_Error_t DSL_DRV_AutobootStateCheck( case DSL_AUTOBOOTSTATE_CONFIG_WRITE_WAIT: #if defined (DSL_VRX_DEVICE_VR11) - DSL_DRV_AutobootHandlePowerDown(pContext); + nErrCode = DSL_DRV_AutobootHandlePowerDown(pContext); + + if (nErrCode != DSL_SUCCESS) + { + DSL_DEBUG(DSL_DBG_ERR, (pContext, SYS_DBG_ERR + "DSL[%02d]: ERROR - DSL_DRV_AutobootHandlePowerDown returned=%d!" + DSL_DRV_CRLF, DSL_DEV_NUM(pContext), nErrCode)); + } #endif /* Wait for the external trigger to continue Autoboot processing*/ @@ -1933,32 +1940,28 @@ static DSL_Error_t DSL_DRV_AutobootHandlePowerDown( DSL_Error_t nErrCode = DSL_SUCCESS; DSL_boolean_t bPowerDown = DSL_FALSE, bPoweredDown = DSL_FALSE; DSL_DEV_VersionCheck_t nVerCheck = 0; - ACK_ADSL_FeatureMapGet_t nFeatureMapGetAck; + ACK_ADSL_FeatureMapGet_t nFeatureMapGetAck = { 0 }; DSL_CTX_READ_SCALAR(pContext, nErrCode, bPowerDown, bPowerDown); if (bPowerDown) { - nErrCode = DSL_DRV_VRX_FirmwareVersionCheck(pContext, - DSL_MIN_FW_VERSION_VR11_R4MR2, &nVerCheck); - - if (nErrCode != DSL_SUCCESS) + if (DSL_DRV_VRX_FirmwareXdslModeCheck(pContext, DSL_VRX_FW_VDSL2)) { - DSL_DEBUG(DSL_DBG_ERR, (pContext, SYS_DBG_ERR - "DSL[%02d]: ERROR - FW version check failed!" - DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); + nErrCode = DSL_DRV_VRX_FirmwareVersionCheck(pContext, + DSL_MIN_FW_VERSION_VR11_PD, &nVerCheck); + } + else + { + nErrCode = DSL_DRV_VRX_FirmwareVersionCheck(pContext, + DSL_MIN_FW_VERSION_VR11_PD_ADSL, &nVerCheck); } - else if (nVerCheck >= DSL_VERSION_EQUAL) + + if (nErrCode == DSL_SUCCESS && nVerCheck >= DSL_VERSION_EQUAL) { nErrCode = DSL_DRV_VRX_SendMsgFeatureMapGet(pContext, (DSL_uint8_t *) &nFeatureMapGetAck); - if (nErrCode != DSL_SUCCESS ) - { - DSL_DEBUG( DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Feature Map get failed!" - DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); - } - else if (nFeatureMapGetAck.W0F12) + if (nErrCode == DSL_SUCCESS && nFeatureMapGetAck.W0F12 == VRX_ENABLE) { bPoweredDown = DSL_TRUE; @@ -1970,12 +1973,8 @@ static DSL_Error_t DSL_DRV_AutobootHandlePowerDown( */ pContext->bAutobootThreadShutdown = DSL_TRUE; - #ifdef INCLUDE_DSL_PM - /* Suspend PM module*/ - nErrCode = DSL_DRV_PM_Suspend(pContext); - - if (nErrCode != DSL_SUCCESS) + if (DSL_DRV_PM_Suspend(pContext) != DSL_SUCCESS) { DSL_DEBUG( DSL_DBG_ERR, (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - PM module suspend failed!" @@ -1991,13 +1990,21 @@ static DSL_Error_t DSL_DRV_AutobootHandlePowerDown( "DSL[%02d]: Powering down..." DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); } + else if (nFeatureMapGetAck.W0F12 == VRX_DISABLE) + { + DSL_DEBUG( DSL_DBG_WRN, + (pContext, SYS_DBG_WRN"DSL[%02d]: Feature-Bit12 is disabled!" + DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); + + nErrCode = DSL_ERR_NOT_SUPPORTED_BY_FIRMWARE; + } } else { nErrCode = DSL_ERR_NOT_SUPPORTED_BY_FIRMWARE; } - if(bPoweredDown == DSL_FALSE) + if (bPoweredDown == DSL_FALSE) { DSL_CTX_WRITE_SCALAR(pContext, nErrCode, bPowerDown, DSL_FALSE); } diff --git a/src/device/drv_dsl_cpe_msg_vrx.c b/src/device/drv_dsl_cpe_msg_vrx.c index 6e64e59..6503f3a 100644 --- a/src/device/drv_dsl_cpe_msg_vrx.c +++ b/src/device/drv_dsl_cpe_msg_vrx.c @@ -1,7 +1,7 @@ /****************************************************************************** - Copyright (c) 2007-2015 - Lantiq Beteiligungs-GmbH & Co. KG + Copyright 2018 Intel Corporation + Copyright 2007 - 2015 Lantiq Beteiligungs-GmbH & Co. KG For licensing information, see the file 'LICENSE' in the root folder of this software module. @@ -1755,6 +1755,14 @@ DSL_void_t DSL_DRV_VRX_DumpMessage( DSL_DBG_ModuleLevel_t dbgmlData; DSL_boolean_t bPrint = DSL_FALSE, bDirSet = DSL_FALSE, bAutoMsg = DSL_FALSE; DSL_uint8_t i; + const IFX_uint32_t nCommonPayloadSize = 5*nSize/2; + const IFX_uint8_t nInfoSize = 35; + const IFX_uint8_t nBufSize = 10; + IFX_uint32_t nMsgSize = nCommonPayloadSize + nInfoSize; + IFX_uint32_t nCharsWrittenToBuf = 0; + char msg[nMsgSize]; + char buf[nBufSize]; + dbgmlData.data.nDbgLevel = DSL_DBG_NONE; dbgmlData.data.nDbgModule = DSL_DBG_MESSAGE_DUMP; @@ -1823,11 +1831,12 @@ DSL_void_t DSL_DRV_VRX_DumpMessage( { bAutoMsg = DSL_TRUE; } - - DSL_DRV_debug_printf(pContext, "DSL[%02d/%s]: 0x%04x 0x%04x 0x%04x", - DSL_DEV_NUM(pContext), - bReceive == DSL_TRUE ? (bAutoMsg == DSL_TRUE ? "ev" : "rx") : "tx", - nMsgId, pData[0], pData[1]); + snprintf(msg, nInfoSize, + "DSL[%02d/%s]: 0x%04x 0x%04x 0x%04x", + DSL_DEV_NUM(pContext), + bReceive == DSL_TRUE ? (bAutoMsg == DSL_TRUE ? "ev" : "rx") : "tx", + nMsgId, pData[0], pData[1]); + nMsgSize -= nInfoSize; /* decide wether to interpret the rest as 16 or 32 bit */ if (nMsgId & VDSL2_MBX_MSG_ID_IFX_MASK) @@ -1835,7 +1844,9 @@ DSL_void_t DSL_DRV_VRX_DumpMessage( /* IFX message: 32 bit */ for (i=0; i<((nSize-4)/4); i++) { - DSL_DRV_debug_printf(pContext, " %08X", pMsg32[i]); + nCharsWrittenToBuf = snprintf(buf, nBufSize, " %08X", pMsg32[i]); + strncat(msg, buf, nMsgSize); + nMsgSize -= nCharsWrittenToBuf; } } else @@ -1843,11 +1854,15 @@ DSL_void_t DSL_DRV_VRX_DumpMessage( /* no IFX message: 16 bit */ for (i=0; i<((nSize-4)/2); i++) { - DSL_DRV_debug_printf(pContext, " %04X", pMsg16[i]); + nCharsWrittenToBuf = snprintf(buf, nBufSize, " %04X", pMsg16[i]); + strncat(msg, buf, nMsgSize); + nMsgSize -= nCharsWrittenToBuf; } } + strncat(msg, DSL_DRV_CRLF, nMsgSize); + - DSL_DRV_debug_printf(pContext, DSL_DRV_CRLF); + DSL_DRV_debug_printf(pContext, msg); } } #endif /* #ifndef DSL_DEBUG_DISABLE*/ diff --git a/src/include/drv_dsl_cpe_api.h b/src/include/drv_dsl_cpe_api.h index 91cfe20..8e10d01 100644 --- a/src/include/drv_dsl_cpe_api.h +++ b/src/include/drv_dsl_cpe_api.h @@ -764,32 +764,38 @@ typedef struct hw_platform.feature_set.major_ver.minor_ver.rel_indication.application Hardware platform (hw_platform): - - 0x01: XWAY(TM) AMAZON Family (not covered by DSL CPE API!) - - 0x02: XWAY(TM) DANUBE Family (not supported anymore) - - 0x03: XWAY(TM) AMAZON-SE Family (not supported anymore) - - 0x04: XWAY(TM) ARX100 Family - - 0x05: XWAY(TM) VRX200 Family - - 0x06: XWAY(TM) ARX300 Family - - 0x07: XWAY(TM) VRX300 Family - - 0x08: XWAY(TM) VRX500 Family + + - 0x01: AMAZON Family (not covered by DSL CPE API!) + - 0x02: DANUBE Family (not supported anymore) + - 0x03: AMAZON-SE Family (not supported anymore) + - 0x04: ARX100 Family + - 0x05: VRX200 Family + - 0x06: ARX300 Family + - 0x07: VRX300 Family + - 0x08: VRX500 Family Feature set (feature_set) + - Indicates the major feature set implementation for firmware (please refer to firmware documentation and/or contact Intel for detailed informations). Major version (major_ver) + - Logical number (incremented for major updates of firmware) Minor version (minor_ver) + - Logical number (incremented for minor updates of firmware) Release indication (rel_indication) + - 0x00: RELEASE_STATUS_RELEASED, The firmware has been tested and released. - 0x01: RELEASE_STATUS_PRE_RELEASE, The firmware is undergoing the release process; the release has not been completed. Application type (application) The following application types are defined. + - 0x01: ADSL Annex A - 0x02: ADSL Annex B - 0x06: VDSL @@ -1212,12 +1218,10 @@ typedef struct /** Retransmission (ReTx) config/status value. - \note Currently the ReTx feature is only supported for downstream direction. - Therefore configurations are only possible for downstream and will be - ignored for upstream. Additionally a warning - \ref DSL_WRN_CONFIG_PARAM_IGNORED is returned in that case. - \note In case of using a VDSL capable platform the configuration is only - valid in case of using VDSL link activation mode. */ + \note In case of operating a VRX family based system, retransmission (ReTx) + configuration for US can only be enabled together with ReTx + configuration for DS. This means that ReTx for DS needs to be enabled + first. */ DSL_CFG DSL_boolean_t bReTxEnable; /** Virtual noise config/status value. @@ -1225,7 +1229,7 @@ typedef struct \note The status value for virtual noise is directly derived from the configuration value (configuration value only) for ADSL only capable platforms. - \note Supported by XWAY(TM) VR200 and XWAY(TM) VR300 */ + \note Supported by VR200 and VR300 */ DSL_CFG DSL_boolean_t bVirtualNoiseSupport; /** 20 bit constellation config/status value. @@ -4502,7 +4506,7 @@ typedef enum Restarts the firmware and the DSL CPE API for usage of updated configurations. \note The standard handling for this command is to perform a hard reset (full firmware download, including a reset and writing the firmware) - \note In case of using XWAY(TM) VRX200 and activated bonded (dual-port mode, + \note In case of using VR200 and activated bonded (dual-port mode, on-chip bonding) operation this command performs a soft reset instead (using firmware message CMD_ModemFSM_StateSet:LinkControl=0) */ DSL_AUTOBOOT_CTRL_RESTART = 2, @@ -4533,7 +4537,7 @@ typedef enum and writing the firmware). \attention In non-bonded operation this command is equivalent to the standard autoboot restart command \ref DSL_AUTOBOOT_CTRL_RESTART. In case - of using XWAY(TM) VRX200 and activated bonded (dual-port mode, + of using VR200 and activated bonded (dual-port mode, on-chip bonding) operation this command forces a hard reset whereas the standard command does a soft reset only to avoid tearing down both lines. */ @@ -4779,7 +4783,7 @@ typedef struct /** Defines the control functionalities of the autoboot handling \note Please note that this configurations are only used for ADSL only - platforms such like XWAY(TM) ARX100 and XWAY(TM) ARX300 + platforms such like ARX100 and ARX300 */ typedef enum { @@ -4834,7 +4838,7 @@ typedef enum /** Structure used for configuration of MinSnrMarging reboot criteria. \note Please note that this configurations are only used for ADSL only - platforms such like XWAY(TM) ARX100 and XWAY(TM) ARX300 + platforms such like ARX100 and ARX300 */ typedef struct { diff --git a/src/include/drv_dsl_cpe_api_bnd_vrx.h b/src/include/drv_dsl_cpe_api_bnd_vrx.h index 6a148c5..95af9a5 100644 --- a/src/include/drv_dsl_cpe_api_bnd_vrx.h +++ b/src/include/drv_dsl_cpe_api_bnd_vrx.h @@ -128,7 +128,7 @@ DSL_Error_t DSL_DRV_BND_VRX_ConfigWrite( DSL_Context_t *pContext); /** - XWAY(TM) VRX200 device specific Bonding HW initialization. + VRX200 device specific Bonding HW initialization. \param pContext - Pointer to dsl cpe library context structure, [I/O] \param pData - Pointer to the Bonding HW initialization data, [I] diff --git a/src/include/drv_dsl_cpe_api_config.h b/src/include/drv_dsl_cpe_api_config.h index cd16058..110c3a6 100644 --- a/src/include/drv_dsl_cpe_api_config.h +++ b/src/include/drv_dsl_cpe_api_config.h @@ -170,7 +170,7 @@ #define PACKAGE_NAME "DSL CPE API driver" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "DSL CPE API driver 4.20.1.2" +#define PACKAGE_STRING "DSL CPE API driver 4.20.1.2.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "drv_dsl_cpe_api" @@ -179,7 +179,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "4.20.1.2" +#define PACKAGE_VERSION "4.20.1.2.0" /* Version number of package */ -#define VERSION "4.20.1.2" +#define VERSION "4.20.1.2.0" diff --git a/src/include/drv_dsl_cpe_api_error.h b/src/include/drv_dsl_cpe_api_error.h index 4d3ebf6..766023e 100644 --- a/src/include/drv_dsl_cpe_api_error.h +++ b/src/include/drv_dsl_cpe_api_error.h @@ -252,20 +252,21 @@ typedef enum /** One or more parameters are ignored */ DSL_WRN_CONFIG_PARAM_IGNORED = 4, /** This warning is used in case of an event was lost. - This could happen due to the following reasons - - polling cycle within polling based event handling is to slow - - system overload respective improper priorities within interrupt based - event handling - Also refer to "Event Handling" chapter within UMPR to get all the details. */ + This could happen due to the following reasons + - polling cycle within polling based event handling is to slow + - system overload respective improper priorities within interrupt based + event handling + Also refer to the "Event Handling" chapter within Programmer's Reference + for more details. */ DSL_WRN_EVENT_FIFO_OVERFLOW = 5, - /** The ioctl function that has been used is deprecated. - Please do not use this function anymore. Refer to the according documentation - (release notes and/or User's Manual Programmer's Reference [UMPR]) of - the DSL CPE API to find the new function that has to be used. */ + /** The function which has been used is deprecated. + Please do not use this function anymore. Refer to the according + documentation (Release Notes and/or Programmer's Reference [PR]) of the + DSL CPE API to find a new function that has to be used. */ DSL_WRN_DEPRECATED = 6, - /** This warning occurs if the firmware did not accept the last message. - This may occur if the message is unknown or not allowed in the current - state. */ + /** This warning occurs if the firmware did not accept the last message. This + may occur if the message is unknown or not allowed in the current + state. */ DSL_WRN_FIRMWARE_MSG_DENIED = 9, /** This warning occurs if no data available from the device. */ DSL_WRN_DEVICE_NO_DATA = 10, diff --git a/src/include/drv_dsl_cpe_api_ioctl.h b/src/include/drv_dsl_cpe_api_ioctl.h index fe6beba..44510d9 100644 --- a/src/include/drv_dsl_cpe_api_ioctl.h +++ b/src/include/drv_dsl_cpe_api_ioctl.h @@ -346,8 +346,9 @@ typedef union CLI - n/a - Note: This ioctl is called within context of starting up the control - application in case of using '-i' option, also refer to UMPR - "Command line arguments for the DSL CPE Control Application" + application in case of using '-i' option, also refer to the + description of "Command line arguments for the DSL CPE Control + Application" within Programmer's Reference. \param DSL_Init_t* The parameter points to a \ref DSL_Init_t structure @@ -1128,7 +1129,7 @@ typedef union CLI - Not applicable for CLI interface - Note: This ioctl is called within context of exception handling in case of - ADSL only platform build. Also refer to the UMPR, + ADSL only platform build. Also refer to the Programmers's Reference - configure option: --enable-adsl-trace - event type: DSL_EVENT_S_SHOWTIME_LOGGING @@ -1142,7 +1143,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100 and XWAY(TM) ARX300) + - ADSL only platforms (ARX100 and ARX300) \code DSL_ShowtimeLogging_t data; @@ -1373,7 +1374,8 @@ typedef union CLI - Not applicable for CLI interface - Note: This ioctl is called within context of event handling within control - application. Also refer to the UMPR "Event Handling" + application. Also refer to the "Event Handling" description within + Programmer's Reference. \param DSL_EventStatus_t* The parameter points to a \ref DSL_EventStatus_t structure @@ -1400,7 +1402,7 @@ typedef union /** This function has to be used to initialize instance specific handling. - Usually this function shall be called directly after using \ref DSL_FIO_INIT + Usually this function shall be called directly before using \ref DSL_FIO_INIT ioctl. CLI @@ -1558,7 +1560,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_InteropFeatureConfig_t interopFeatureConfig; @@ -1590,7 +1592,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_InteropFeatureConfig_t interopFeatureConfig; @@ -1654,7 +1656,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_MiscLineStatus_t miscLineStatus; @@ -1717,7 +1719,7 @@ typedef union is included within accessCtl structure of user data. \remarks - - Supported by ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - Supported by ADSL only platforms (ARX100, ARX300) - Please note that a change of this configuration setting(s) will be only effective after restarting the autoboot handling using ioctl \ref DSL_FIO_AUTOBOOT_CONTROL_SET with command \ref DSL_AUTOBOOT_CTRL_RESTART @@ -1752,7 +1754,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_LineOptionsConfig_t lineOptionsConfig; @@ -1820,7 +1822,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_DBG_DebugFeatureConfig_t dbgDebugFeatureConfig; @@ -1858,7 +1860,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_DBG_DebugFeatureConfig_t dbgDebugFeatureConfig; @@ -2436,8 +2438,9 @@ typedef union CLI - n/a - Note: This ioctl is called within context of starting up the control - application in case of using '-i' option, also refer to UMPR - "Command line arguments for the DSL CPE Control Application" + application in case of using '-i' option, also refer to the + description of "Command line arguments for the DSL CPE Control + Application" within Programmer's Reference. \param DSL_BND_HwInit_t* The parameter points to a \ref DSL_BND_HwInit_t structure @@ -2449,10 +2452,10 @@ typedef union \remarks Supported by - - XWAY(TM) VRX200: xDSL-CPE + - VRX200: xDSL-CPE - \note This ioctl is reserved for future usage on XWAY(TM) VRX200. This means - there is currently no functionality included. + \note This ioctl is reserved for future usage on VRX200. This means there is + currently no functionality included. \code DSL_BND_HwInit_t BND_HwInit; @@ -2718,7 +2721,7 @@ typedef union \remarks Supported by - - XWAY(TM) VRX200: xDSL-CPE + - VRX200: xDSL-CPE \code DSL_BND_PortModeSync_t BND_PortModeSync; @@ -3215,7 +3218,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_G997_LastStateTransmitted_t lastStateTransmitted; @@ -3792,10 +3795,10 @@ typedef union - long command: G997_DeltFreeResources - short command: g997dfr - Note: This ioctl usage only makes sense in case of using dynamically - allocated diagnostic data (DELT) memory. Also refer to the UMPR - configure option: "--enable-dsl-delt-static=no". - In that case and after a DELT measurement has taken place the - API internal memory could be freed by using this function. + allocated diagnostic data (DELT) memory. Also refer to the configure + option "--enable-dsl-delt-static=no" within Programmer's Reference. + In that case and after a DELT measurement has taken place the API + internal memory could be freed by using this function. \return 0 if successful and -1 in case of an error/warning @@ -3832,7 +3835,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_G997_Snmp_t snmpData; @@ -3865,7 +3868,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_G997_Snmp_t snmpData; @@ -3965,7 +3968,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_G997_RateAdaptationStatus_t raStatGet; @@ -5532,7 +5535,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_PM_ChannelCountersExt_t pmChannelCountersExt; @@ -6345,7 +6348,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_RTT_Init_t RTT_Init; @@ -6377,7 +6380,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \remarks - Please note that a change of this configuration setting(s) will be only effective after restarting the autoboot handling using ioctl @@ -6416,7 +6419,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_RTT_Config_t RTT_Config; @@ -6448,7 +6451,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_RTT_Status_t DSL_RTT_Status; @@ -6481,7 +6484,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_RTT_Control_t RTT_Control; @@ -6516,7 +6519,7 @@ typedef union \remarks Supported by - - ADSL only platforms (XWAY(TM) ARX100, XWAY(TM) ARX300) + - ADSL only platforms (ARX100, ARX300) \code DSL_RTT_Statistics_t RTT_Config; diff --git a/src/include/drv_dsl_cpe_autoboot.h b/src/include/drv_dsl_cpe_autoboot.h index 243d5dc..c582be4 100644 --- a/src/include/drv_dsl_cpe_autoboot.h +++ b/src/include/drv_dsl_cpe_autoboot.h @@ -164,15 +164,15 @@ DSL_Error_t DSL_DRV_AutobootHandleDeviceEvt( #define DSL_AUTOBOOT_TRAINING_POLL_TIME 1000 #define DSL_AUTOBOOT_INIT_POLL_TIME 100 #define DSL_AUTOBOOT_SHOWTIME_POLL_TIME 1000 -#define DSL_AUTOBOOT_EXCEPTION_POLL_TIME 0 +#define DSL_AUTOBOOT_EXCEPTION_POLL_TIME 10 #define DSL_AUTOBOOT_DIAGNOSTIC_POLL_TIME 1000 -#define DSL_AUTOBOOT_FW_REQUEST_POLL_TIME 0 +#define DSL_AUTOBOOT_FW_REQUEST_POLL_TIME 10 #define DSL_AUTOBOOT_FW_WAIT_POLL_TIME 100 #define DSL_AUTOBOOT_LINK_ACTIVATE_WAIT_POLL_TIME 100 #define DSL_AUTOBOOT_CONFIG_WRITE_WAIT_POLL_TIME 100 #define DSL_AUTOBOOT_RESTART_WAIT_POLL_TIME 100 #define DSL_AUTOBOOT_FW_READY_POLL_TIME 100 -#define DSL_AUTOBOOT_RESTART_POLL_TIME 0 +#define DSL_AUTOBOOT_RESTART_POLL_TIME 100 #define DSL_AUTOBOOT_ORDERLY_SHUTDOWN_POLL_TIME 250 #define DSL_AUTOBOOT_DISABLE_POLL_TIME 100 diff --git a/src/include/drv_dsl_cpe_device_vrx.h b/src/include/drv_dsl_cpe_device_vrx.h index 4f73730..5e9812b 100644 --- a/src/include/drv_dsl_cpe_device_vrx.h +++ b/src/include/drv_dsl_cpe_device_vrx.h @@ -68,7 +68,8 @@ #define DSL_MIN_FW_VERSION_RA_MODE_GET 5, 1, -1, -1, -1 #define DSL_MIN_FW_VERSION_ADSL_PTM_BONDING 0xB, 0, 4, -1, -1 #define DSL_MIN_FW_VERSION_VR11_R5 0xC, -1, -1, -1, -1 -#define DSL_MIN_FW_VERSION_VR11_R4MR2 0xC, 1, 4, -1, -1 +#define DSL_MIN_FW_VERSION_VR11_PD 0xC, 1, 4, -1, -1 +#define DSL_MIN_FW_VERSION_VR11_PD_ADSL 0xC, 1, 0, -1, -1 /* Internal device dependent configuration options diff --git a/src/pm/drv_dsl_cpe_api_pm.c b/src/pm/drv_dsl_cpe_api_pm.c index dd45d24..62a395c 100644 --- a/src/pm/drv_dsl_cpe_api_pm.c +++ b/src/pm/drv_dsl_cpe_api_pm.c @@ -19,6 +19,8 @@ #undef DSL_DBG_BLOCK #define DSL_DBG_BLOCK DSL_DBG_PM +#include <linux/delay.h> +#define DSL_PM_THREAD_COUNT 50 /** \addtogroup DRV_DSL_CPE_PM @{ */ @@ -160,7 +162,7 @@ DSL_Error_t DSL_DRV_PM_Start( #if defined(INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS) && defined (INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS) DSL_XTUDir_t dir; #endif - + unsigned int count = DSL_PM_THREAD_COUNT; DSL_CHECK_CTX_POINTER(pContext); DSL_CHECK_ERR_CODE(); @@ -557,16 +559,30 @@ DSL_Error_t DSL_DRV_PM_Start( } /* Check the PM module Near-End and Far-End thread active flag */ - if( DSL_DRV_PM_CONTEXT(pContext)->pmThreadFe.bRun == DSL_FALSE && - DSL_DRV_PM_CONTEXT(pContext)->pmThreadNe.bRun == DSL_FALSE ) + while(count > 0) { - DSL_DEBUG(DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - PM module NE and FE threads start failed!" - DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); + count--; + msleep (100); - DSL_DRV_MemFree(DSL_DRV_PM_CONTEXT(pContext)->pCounters); - DSL_DRV_MemFree(DSL_DRV_PM_CONTEXT(pContext)->pCountersDump); - DSL_DRV_MemFree(pContext->PM); + if ((DSL_DRV_PM_CONTEXT(pContext)->pmThreadFe.bRun == DSL_TRUE) && + (DSL_DRV_PM_CONTEXT(pContext)->pmThreadNe.bRun == DSL_TRUE)) + { + DSL_DEBUG(DSL_DBG_MSG, + (pContext, SYS_DBG_MSG"DSL[%02d]: PM module NE and FE threads start success!" + DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); + break; + } + + if (count == 0) + { + DSL_DEBUG(DSL_DBG_ERR, + (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - PM module NE and FE threads start failed!" + DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); + + DSL_DRV_MemFree(DSL_DRV_PM_CONTEXT(pContext)->pCounters); + DSL_DRV_MemFree(DSL_DRV_PM_CONTEXT(pContext)->pCountersDump); + DSL_DRV_MemFree(pContext->PM); + } } DSL_DEBUG(DSL_DBG_MSG, diff --git a/src/pm/drv_dsl_cpe_pm_core.c b/src/pm/drv_dsl_cpe_pm_core.c index 9c3b48d..719019a 100644 --- a/src/pm/drv_dsl_cpe_pm_core.c +++ b/src/pm/drv_dsl_cpe_pm_core.c @@ -778,6 +778,7 @@ DSL_int_t DSL_DRV_PM_ThreadNe(DSL_DRV_ThreadParams_t *param) DSL_int_t nOsRet = 0; DSL_Context_t *pContext = (DSL_Context_t*)param->nArg1; DSL_uint32_t startTime, stopTime; + DSL_boolean_t bPowerDown = DSL_FALSE; DSL_DEBUG( DSL_DBG_MSG, (pContext, SYS_DBG_MSG"DSL[%02d]: IN - DSL_DRV_PM_ThreadNe" @@ -814,6 +815,10 @@ DSL_int_t DSL_DRV_PM_ThreadNe(DSL_DRV_ThreadParams_t *param) if (DSL_DRV_SIGNAL_PENDING) break; + DSL_CTX_READ_SCALAR(pContext, nErrCode, bPowerDown, bPowerDown); + if (bPowerDown) + break; + /* Get Start Time*/ startTime = DSL_DRV_PM_TIME_GET(); @@ -906,6 +911,7 @@ DSL_int_t DSL_DRV_PM_ThreadFe(DSL_DRV_ThreadParams_t *param) DSL_int_t nOsRet = 0; DSL_Context_t *pContext = (DSL_Context_t*)param->nArg1; DSL_uint32_t startTime, stopTime; + DSL_boolean_t bPowerDown = DSL_FALSE; DSL_DEBUG( DSL_DBG_MSG, (pContext, SYS_DBG_MSG"DSL[%02d]: IN - DSL_DRV_PM_ThreadFe" @@ -940,6 +946,10 @@ DSL_int_t DSL_DRV_PM_ThreadFe(DSL_DRV_ThreadParams_t *param) if (DSL_DRV_SIGNAL_PENDING) break; + DSL_CTX_READ_SCALAR(pContext, nErrCode, bPowerDown, bPowerDown); + if (bPowerDown) + break; + /* Get Start Time*/ startTime = DSL_DRV_PM_TIME_GET(); @@ -6748,10 +6758,41 @@ DSL_Error_t DSL_DRV_PM_Resume( DSL_Context_t *pContext) { DSL_Error_t nErrCode = DSL_SUCCESS; + unsigned int i = 3; + + /* Loop for 3 iterations at max with sleep of max 3 secs to avoid contention between + PM thread not getting initialized, when autoboot thread is trying to do PM_RESUME + Probably the best way will be to synchronize autoboot thread and PM_thread during init + In our tests we see that it passes in 1 loop itself at max, but 3 for safeside + This is a workqround, needs a proper fix. */ - if (DSL_DRV_PM_CONTEXT(pContext) == DSL_NULL) + while(i > 0) { - return DSL_ERR_POINTER; + i--; + + if (DSL_DRV_PM_CONTEXT(pContext) == DSL_NULL) + { + DSL_DEBUG(DSL_DBG_ERR, + (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - PM context NULL Retry after 1 sec" + DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); + } + else + { + break; + } + + /* Didn't find it even after three iterations, something really wrong, so exit */ + if (i == 0) + { + DSL_DEBUG(DSL_DBG_ERR, + (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - PM context NULL Returning" + DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); + + return DSL_ERR_POINTER; + } + + /* Sleep for 1 sec and check again */ + msleep(1000); } if (DSL_DRV_PM_CONTEXT(pContext)->bPmLock) -- GitLab