diff --git a/ChangeLog b/ChangeLog index 7f786750d82ef1c5b50993d093490943fd8d569c..fe9f765ddde71753a100ade6cf2dd3c147d8dddd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,20 @@ NEXT VERSION +V4.21.6.2 - 2019-12-30 +- + +V4.21.6.1 - 2019-12-27 +common: +- VRX (CURTSYS-2901) Crash on performing actions within context of reboot command + + Added reboot notifier to Linux handling of DSL CPE API +- Re-classified some debug prints from error to warning (to reflect correct debug + levels) + V4.21.6 - 2019-10-14 - V4.21.5 - 2019-10-08 +common: - VRX (CURTSYS-2646) Refactoring configuration interface between dsl_cpe_control and DSL API Driver diff --git a/configure b/configure index 228791236f024b85b682b6b9312ccc0084fc64cd..cf5c031c6586115e6982897e2d9c4e66c507f1aa 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.21.6. +# Generated by GNU Autoconf 2.69 for DSL CPE API driver 4.21.6.2. # # # 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.21.6' -PACKAGE_STRING='DSL CPE API driver 4.21.6' +PACKAGE_VERSION='4.21.6.2' +PACKAGE_STRING='DSL CPE API driver 4.21.6.2' 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.21.6 to adapt to many kinds of systems. +\`configure' configures DSL CPE API driver 4.21.6.2 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.21.6:";; + short | recursive ) echo "Configuration of DSL CPE API driver 4.21.6.2:";; 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.21.6 +DSL CPE API driver configure 4.21.6.2 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.21.6, which was +It was created by DSL CPE API driver $as_me 4.21.6.2, 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.21.6' + VERSION='4.21.6.2' 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.21.6, which was +This file was extended by DSL CPE API driver $as_me 4.21.6.2, 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.21.6 +DSL CPE API driver config.status 4.21.6.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.in b/configure.in index 145467052a52147dad3f0a9ccc0b433d40e83701..7c1468a594b10b2aaf0fc2afbfef91c07b825152 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ AC_REVISION($Revision: 1.177 $) -AC_INIT([DSL CPE API driver],[4.21.6],[],[drv_dsl_cpe_api]) +AC_INIT([DSL CPE API driver],[4.21.6.2],[],[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 a16a9c23e6c8e23f5730032dd22eb629320a939c..9ca4571e8ceaa7569898640462386a705798fdee 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.21.6 +PROJECT_NUMBER = 4.21.6.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. @@ -428,7 +428,7 @@ INPUT = ./dsl_cpe_api.h \ ../src/include/drv_dsl_cpe_debug.h \ ../src/include/drv_dsl_cpe_api_error.h \ ../src/include/drv_dsl_cpe_vrx_ctx.h \ - ../../fapi/include/dsl_fapi.h \ + ../../application/dsl_cpe_control/src/dsl_cpe_interface.h \ ../../../drv_dsl_cpe_mei/vdsl/src/drv_mei_cpe_interface.h FILE_PATTERNS = diff --git a/src/common/drv_dsl_cpe_api.c b/src/common/drv_dsl_cpe_api.c index 29f5d3edf0240f48d5339a400b41b4453843c69e..9ddc8d721db41c7406a53269b2cad3a7cf239bae 100644 --- a/src/common/drv_dsl_cpe_api.c +++ b/src/common/drv_dsl_cpe_api.c @@ -6157,8 +6157,8 @@ DSL_Error_t DSL_DRV_T1413_XTUO_RevisionStatusGet( } else { - DSL_DEBUG(DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - T1.413 XTUO Revision Number get " + DSL_DEBUG(DSL_DBG_WRN, + (pContext, SYS_DBG_WRN"DSL[%02d]: WARNING - T1.413 XTUO Revision Number get " "not supported in current ADSL mode or Annex!" DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); @@ -6179,8 +6179,8 @@ DSL_Error_t DSL_DRV_T1413_XTUO_RevisionStatusGet( } else { - DSL_DEBUG(DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - T1.413 XTUO Revision Number get " + DSL_DEBUG(DSL_DBG_WRN, + (pContext, SYS_DBG_WRN"DSL[%02d]: WARNING - T1.413 XTUO Revision Number get " "not supported in current ADSL mode or Annex!" DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); @@ -6235,8 +6235,8 @@ DSL_Error_t DSL_DRV_T1413_XTUR_RevisionStatusGet( } else { - DSL_DEBUG(DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - T1.413 XTUR Revision Number get " + DSL_DEBUG(DSL_DBG_WRN, + (pContext, SYS_DBG_WRN"DSL[%02d]: WARNING - T1.413 XTUR Revision Number get " "not supported in current ADSL mode or Annex!" DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); @@ -6301,8 +6301,8 @@ DSL_Error_t DSL_DRV_T1413_XTUO_VendorRevisionStatusGet( } else { - DSL_DEBUG(DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - T1.413 XTUO Vendor Revision Number get " + DSL_DEBUG(DSL_DBG_WRN, + (pContext, SYS_DBG_WRN"DSL[%02d]: WARNING - T1.413 XTUO Vendor Revision Number get " "not supported in current ADSL mode or Annex!" DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); @@ -6323,8 +6323,8 @@ DSL_Error_t DSL_DRV_T1413_XTUO_VendorRevisionStatusGet( } else { - DSL_DEBUG(DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - T1.413 XTUO Vendor Revision Number get " + DSL_DEBUG(DSL_DBG_WRN, + (pContext, SYS_DBG_WRN"DSL[%02d]: WARNING - T1.413 XTUO Vendor Revision Number get " "not supported in current ADSL mode or Annex!" DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); @@ -6379,8 +6379,8 @@ DSL_Error_t DSL_DRV_T1413_XTUR_VendorRevisionStatusGet( } else { - DSL_DEBUG(DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - T1.413 XTUR Vendor Revision Number get " + DSL_DEBUG(DSL_DBG_WRN, + (pContext, SYS_DBG_WRN"DSL[%02d]: WARNING - T1.413 XTUR Vendor Revision Number get " "not supported in current ADSL mode or Annex!" DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); diff --git a/src/common/drv_dsl_cpe_os_linux.c b/src/common/drv_dsl_cpe_os_linux.c index bf33f17ef5122c694bd92f486195bc58d783df0a..f255f0f7454c3756816f345aeafca0634a9f8c3d 100644 --- a/src/common/drv_dsl_cpe_os_linux.c +++ b/src/common/drv_dsl_cpe_os_linux.c @@ -22,6 +22,8 @@ #include <linux/device.h> #include <linux/cdev.h> +#include <linux/notifier.h> + #include "drv_mei_cpe_api_intern.h" /* MEI_InternalDevLayout */ #undef DSL_DBG_BLOCK @@ -64,6 +66,8 @@ static DSL_uint_t DSL_DRV_Poll(DSL_DRV_file_t *pFile, DSL_DRV_Poll_Table_t *wait static void DSL_DRV_NlSendMsg(DSL_char_t* pMsg); #endif +void DSL_ModuleCleanup(void); + /*DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile, unsigned long nCommand, unsigned long nArg);*/ @@ -122,6 +126,20 @@ static struct file_operations dslCpeApiOperations = { }; #endif /* #ifndef _lint*/ +static int DSL_DRV_Reboot_Notifier(struct notifier_block *nb, + unsigned long action, + void *data) +{ + printk("DSL: System reboot ongoing..." DSL_DRV_CRLF); + DSL_ModuleCleanup(); + return NOTIFY_OK; +} + +static struct notifier_block dslRebootNb = { + .notifier_call = DSL_DRV_Reboot_Notifier, + .priority = 2, +}; + static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil) { int num = MINOR(ino->i_rdev); @@ -1380,16 +1398,16 @@ int __init DSL_ModuleInit(void) DSL_DRV_DevNodeInit(); + register_reboot_notifier(&dslRebootNb); + return 0; } -void __exit DSL_ModuleCleanup(void) +void DSL_ModuleCleanup(void) { DSL_int_t i; static dev_t dsl_devt; - printk("Module will be unloaded"DSL_DRV_CRLF); - for (i=0; i < g_MaxEntieties; i++) { dsl_devt = MKDEV(nMajorNum, i); @@ -1413,6 +1431,17 @@ void __exit DSL_ModuleCleanup(void) return; } +void __exit DSL_ModuleExit(void) +{ + printk("DSL: Module will be unloaded"DSL_DRV_CRLF); + + unregister_reboot_notifier(&dslRebootNb); + + DSL_ModuleCleanup(); + + return; +} + #ifndef _lint MODULE_LICENSE("Dual BSD/GPL"); @@ -1432,7 +1461,7 @@ module_param(g_ChannelsPerLine, byte, 0); MODULE_PARM_DESC(debug_level, "set to get more (1) or fewer (4) debug outputs"); module_init(DSL_ModuleInit); -module_exit(DSL_ModuleCleanup); +module_exit(DSL_ModuleExit); #endif /* #ifndef _lint*/ //EXPORT_SYMBOL(DSL_ModuleInit); diff --git a/src/include/drv_dsl_cpe_api_config.h b/src/include/drv_dsl_cpe_api_config.h index 7fa1a042577eab58cddcb39ffe0f7f71b661d379..9bfe722055d5180dbfa4ed7f581924563df51eff 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.21.6" +#define PACKAGE_STRING "DSL CPE API driver 4.21.6.2" /* 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.21.6" +#define PACKAGE_VERSION "4.21.6.2" /* Version number of package */ -#define VERSION "4.21.6" +#define VERSION "4.21.6.2" diff --git a/src/pm/drv_dsl_cpe_pm_core.c b/src/pm/drv_dsl_cpe_pm_core.c index 719019a885724d7fd56b347039d15eff38277917..67feff28a7cc03854e975aab2ab5e1255eb68e22 100644 --- a/src/pm/drv_dsl_cpe_pm_core.c +++ b/src/pm/drv_dsl_cpe_pm_core.c @@ -43,8 +43,8 @@ DSL_boolean_t DSL_DRV_PM_IsPmReady( /* Check bPmLock flag*/ if( DSL_DRV_PM_CONTEXT(pContext)->bPmLock ) { - DSL_DEBUG( DSL_DBG_ERR, - (pContext, SYS_DBG_ERR"DSL[%02d: ERROR - PM module is temporary locked!" + DSL_DEBUG( DSL_DBG_WRN, + (pContext, SYS_DBG_WRN"DSL[%02d: WARNING - PM module is temporary locked!" DSL_DRV_CRLF, DSL_DEV_NUM(pContext))); return DSL_FALSE;