Change in osmo-bts[master]: bts_shutdown_fsm: Fix switching too quickly to state WAIT_TRX_CLOSED

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Jul 27 10:42:26 UTC 2020


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/19380 )

Change subject: bts_shutdown_fsm: Fix switching too quickly to state WAIT_TRX_CLOSED
......................................................................

bts_shutdown_fsm: Fix switching too quickly to state WAIT_TRX_CLOSED

Ramping down was set up with a target of -10 dBm, but then the code only
waited for all TRXs to be at least 0dBm, meaning that if operating more
than 1 TRX, the FSM could transit to state ST_WAIT_TRX_CLOSED when one
TRX reached -10 and other were already equal or below 0 (but not yet
-10). As a result, later on, when other TRXs reached -10 dBm they would
trigger EV_TRX_RAMP_COMPL which was not expected (no use) in
ST_WAIT_TRX_CLOSED.

Related: SYS#4864
Change-Id: If7af0b138efe78ec591c199a19fc22b304416a13
---
M src/common/bts_shutdown_fsm.c
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Hoernchen: Looks good to me, approved



diff --git a/src/common/bts_shutdown_fsm.c b/src/common/bts_shutdown_fsm.c
index c81a4ab..0ac3078 100644
--- a/src/common/bts_shutdown_fsm.c
+++ b/src/common/bts_shutdown_fsm.c
@@ -32,6 +32,8 @@
 
 #define X(s) (1 << (s))
 
+#define BTS_SHUTDOWN_POWER_RAMP_TGT -10
+
 static const struct osmo_tdef_state_timeout bts_shutdown_fsm_timeouts[32] = {
 	[BTS_SHUTDOWN_ST_WAIT_RAMP_DOWN_COMPL] = { .T = -1 },
 	[BTS_SHUTDOWN_ST_WAIT_TRX_CLOSED] = { .T = -2 },
@@ -83,7 +85,7 @@
 	llist_for_each_entry(trx, &bts->trx_list, list) {
 		if (trx->mo.nm_state.operational != NM_OPSTATE_ENABLED)
 			continue;
-		power_ramp_start(trx, to_mdB(-10), 1, ramp_down_compl_cb);
+		power_ramp_start(trx, to_mdB(BTS_SHUTDOWN_POWER_RAMP_TGT), 1, ramp_down_compl_cb);
 	}
 }
 
@@ -100,7 +102,7 @@
 
 		llist_for_each_entry(trx, &bts->trx_list, list) {
 			if (trx->mo.nm_state.operational == NM_OPSTATE_ENABLED &&
-			    trx->power_params.p_total_cur_mdBm > 0)
+			    trx->power_params.p_total_cur_mdBm > BTS_SHUTDOWN_POWER_RAMP_TGT)
 				remaining++;
 		}
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/19380
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If7af0b138efe78ec591c199a19fc22b304416a13
Gerrit-Change-Number: 19380
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200727/64973d09/attachment.htm>


More information about the gerrit-log mailing list