commit e66169ebf899aeb38a79b51cd164a378948abe6d
parent d0423285757e4eaf2ee1716a7b175d1643528868
Author: Broadcom SDK Release <sdk.releases@broadcom.com>
Date: Thu, 7 Mar 2019 11:43:24 +0200
SDK-172907: In order to have cmdlist_init() work on all units, it must be cal...
Devices: AllChips
Module: CLI
Symptom:
Segmentation fault at SOC_IS_DFE(unit) call in function cmdlist_init()
In order to have cmdlist_init() work on all units, it must be called
after attach
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sdk-6.5.16/src/appl/diag/cmdlist.c b/sdk-6.5.16/src/appl/diag/cmdlist.c
@@ -863,9 +863,11 @@ cmdlist_init(void)
for (i = 0; i < soc_ndev; i++) {
unit = SOC_NDEV_IDX2DEV(i);
-
+ if(!soc_attached(unit)) {
+ command_mode_set(unit, ESW_CMD_MODE);
+ }
#if defined(BCM_DNX_SUPPORT)
- if(SOC_IS_DNX(unit) ) {
+ else if(SOC_IS_DNX(unit) ) {
command_mode_set(unit, DNX_CMD_MODE);
/** initialize DNX specific dynamic shell commands */
if(diag_sand_error_get(cmd_dnx_sh_init(unit)) != CMD_OK)