diff options
| author | Jan Hoffmann | 2025-01-30 10:19:29 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2025-02-22 17:55:44 +0000 |
| commit | 03bbd36e67e5f4cc9fa838c7d773077c05f6ce16 (patch) | |
| tree | 53b9480f2def4ce78c7f02c416db07a61c311fed | |
| parent | a9b4d1f4b904d47a304e1806bd9f363d3335554d (diff) | |
| download | openwrt-03bbd36e67e5f4cc9fa838c7d773077c05f6ce16.tar.gz | |
ltq-vdsl-vr11: add option for L3 request without retry on failure
This allows to attempt an orderly shutdown via L3 request while avoiding
excessive delay in the failure case (up to 6 seconds with the currently
hard-coded 3 attempts).
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250130102108.1606919-2-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | package/kernel/lantiq/ltq-vdsl-vr11/Makefile | 2 | ||||
| -rw-r--r-- | package/kernel/lantiq/ltq-vdsl-vr11/patches/300-l3-request-no-retry.patch | 46 |
2 files changed, 47 insertions, 1 deletions
diff --git a/package/kernel/lantiq/ltq-vdsl-vr11/Makefile b/package/kernel/lantiq/ltq-vdsl-vr11/Makefile index 99d6e35376..50432986e2 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr11/Makefile +++ b/package/kernel/lantiq/ltq-vdsl-vr11/Makefile @@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-vdsl-vr11 PKG_VERSION:=4.23.1 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_BASE_NAME:=dsl_cpe_api UGW_VERSION=8.5.2.10 diff --git a/package/kernel/lantiq/ltq-vdsl-vr11/patches/300-l3-request-no-retry.patch b/package/kernel/lantiq/ltq-vdsl-vr11/patches/300-l3-request-no-retry.patch new file mode 100644 index 0000000000..818f676b32 --- /dev/null +++ b/package/kernel/lantiq/ltq-vdsl-vr11/patches/300-l3-request-no-retry.patch @@ -0,0 +1,46 @@ +Add option for L3 request without retry on failure + +This allows to attempt an orderly shutdown via L3 request while avoiding +excessive delay in the failure case (up to 6 seconds with the currently +hard-coded 3 attempts). +--- a/src/g997/drv_dsl_cpe_api_g997_vrx.c ++++ b/src/g997/drv_dsl_cpe_api_g997_vrx.c +@@ -1053,6 +1053,7 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManage + { + DSL_Error_t nErrCode = DSL_SUCCESS, nRet = DSL_SUCCESS; + DSL_int_t nAttempt = 0, i = 0; ++ DSL_int_t nAttemptCount = DSL_LX_TO_L3_ATTEMPT_COUNT; + const DSL_int_t nMaxRetry = DSL_LX_TO_L3_TIMEOUT/DSL_L3_WAIT_INTERVAL; + DSL_G997_PowerManagementStatusData_t PmStatus = {DSL_G997_PMS_NA}; + DSL_VRX_L3RequestStatus_t L3RequestStatus = DSL_VRX_L3_STATUS_NA; +@@ -1095,11 +1096,15 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManage + nErrCode = DSL_ERR_NOT_SUPPORTED_BY_DEVICE; + break; + ++ case DSL_G997_PMSF_LX_TO_L3_NO_RETRY: ++ nAttemptCount = 1; ++ fallthrough; ++ + case DSL_G997_PMSF_LX_TO_L3: + if (PmStatus.nPowerManagementStatus != DSL_G997_PMS_L3) + { + /* retry it DSL_LX_TO_L3_ATTEMPT_COUNT times */ +- for (nAttempt = 0; nAttempt < DSL_LX_TO_L3_ATTEMPT_COUNT; nAttempt++) ++ for (nAttempt = 0; nAttempt < nAttemptCount; nAttempt++) + { + /* L3 shutdown request*/ + nErrCode = DSL_DRV_VRX_SendMsgShutdownRequest(pContext); +--- a/src/include/drv_dsl_cpe_api_g997.h ++++ b/src/include/drv_dsl_cpe_api_g997.h +@@ -1199,7 +1199,10 @@ typedef enum + procedure. After reaching the L3 state, the line shall remain in the L3 idle + state until it is forced into another state through this configuration + parameter. */ +- DSL_G997_PMSF_LX_TO_L3 = 3 ++ DSL_G997_PMSF_LX_TO_L3 = 3, ++ /** ++ Same as above, but does not retry in case of failure. */ ++ DSL_G997_PMSF_LX_TO_L3_NO_RETRY = 4 + } DSL_G997_PowerManagementStateForce_t; + + /** |