fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/42525?usp=email )
Change subject: struct trx_power_params: fix inaccurate comment
......................................................................
struct trx_power_params: fix inaccurate comment
Change-Id: I1bdb7fab24fee28dbeac0ed05e13f650e08c98e9
Fixes: 4c632421 ("bts_shutdown_fsm: fix spurious RAMP_COMPL events in WAIT_TRX_CLOSED")
---
M include/osmo-bts/tx_power.h
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/25/42525/1
diff --git a/include/osmo-bts/tx_power.h b/include/osmo-bts/tx_power.h
index 52c02f5..6327c62 100644
--- a/include/osmo-bts/tx_power.h
+++ b/include/osmo-bts/tx_power.h
@@ -60,7 +60,7 @@
struct osmo_timer_list step_timer;
/* call-back called when target is reached */
ramp_compl_cb_t compl_cb;
- /* set to true after compl_cb has been called (ramp target confirmed by hardware) */
+ /* set to true just before compl_cb is called (ramp target confirmed by hardware) */
bool complete;
} ramp;
};
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42525?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I1bdb7fab24fee28dbeac0ed05e13f650e08c98e9
Gerrit-Change-Number: 42525
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42523?usp=email )
Change subject: osmo-bts-trx: rx_rach_fn(): remove redundant fall-back
......................................................................
osmo-bts-trx: rx_rach_fn(): remove redundant fall-back
Condition `synch_seq != RACH_SYNCH_SEQ_TS0` is unlikely to be true,
given that no other synch. sequences are defined by 3GPP TS 45.002.
Even if this happens for whatever reason (e.g. a bug), assigning
`synch_seq` to `RACH_SYNCH_SEQ_TS0` is not needed, as `synch_seq`
is never read after the switch statement. The logging message is
not useful either, since we already print the synch. seq. above.
Change-Id: I4cdc03dc6631ca17d13a3067ad03020e3e97eab1
---
M src/osmo-bts-trx/sched_lchan_rach.c
1 file changed, 0 insertions(+), 6 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo-bts-trx/sched_lchan_rach.c b/src/osmo-bts-trx/sched_lchan_rach.c
index c92dfe2..a4a01a9 100644
--- a/src/osmo-bts-trx/sched_lchan_rach.c
+++ b/src/osmo-bts-trx/sched_lchan_rach.c
@@ -186,12 +186,6 @@
case RACH_SYNCH_SEQ_TS0:
default:
- /* Fall-back to the default TS0 if needed */
- if (synch_seq != RACH_SYNCH_SEQ_TS0) {
- LOGL1SB(DL1P, LOGL_DEBUG, l1ts, bi, "Falling-back to the default TS0\n");
- synch_seq = RACH_SYNCH_SEQ_TS0;
- }
-
rc = gsm0503_rach_decode_ber(&ra, bi->burst + RACH_EXT_TAIL_LEN + RACH_SYNCH_SEQ_LEN,
trx->bts->bsic, &n_errors, &n_bits_total);
if (rc) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42523?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4cdc03dc6631ca17d13a3067ad03020e3e97eab1
Gerrit-Change-Number: 42523
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42524?usp=email )
Change subject: bts_shutdown_fsm: fix spurious RAMP_COMPL events in WAIT_TRX_CLOSED
......................................................................
bts_shutdown_fsm: fix spurious RAMP_COMPL events in WAIT_TRX_CLOSED
With multiple TRXes ramping down in lockstep, both their final
ramp-timer callbacks fire back-to-back in the same event loop pass,
setting p_total_cur_mdBm to the target value for both before any async
hardware acknowledgement arrives. When the first SETPOWER ack returns
and fires ramp_down_compl_cb() for TRX0, the remaining-TRX check in
st_wait_ramp_down_compl() inspects p_total_cur_mdBm for TRX1 and finds
it already at the target - concluding that all TRXes are done. The FSM
then transitions to WAIT_TRX_CLOSED, and the second ack (for TRX1)
fires ramp_down_compl_cb() into the wrong state, producing:
BTS_SHUTDOWN(...){WAIT_TRX_CLOSED}: Event BTS_SHUTDOWN_EV_TRX_RAMP_COMPL not permitted
The root cause is that p_total_cur_mdBm is a *requested* value set in
the timer callback, not a confirmed one. The hardware confirmation
arrives asynchronously via power_trx_change_compl() ->
power_ramp_do_step(), which is also where compl_cb() is invoked.
Fix by adding a 'complete' flag to trx_power_params.ramp that is:
* cleared when _power_ramp_start() begins a new ramp, and
* set just before compl_cb() is called in power_ramp_do_step()
The shutdown FSM remaining-TRX count then checks !ramp.complete instead of
comparing p_total_cur_mdBm against the target, correctly reflecting which
TRXes have actually received hardware confirmation of ramp completion.
Change-Id: Ia71393e871187d6b44b7f520eb421bab354aafd1
---
M include/osmo-bts/tx_power.h
M src/common/bts_shutdown_fsm.c
M src/common/tx_power.c
3 files changed, 6 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/include/osmo-bts/tx_power.h b/include/osmo-bts/tx_power.h
index 73134c8..52c02f5 100644
--- a/include/osmo-bts/tx_power.h
+++ b/include/osmo-bts/tx_power.h
@@ -1,6 +1,7 @@
#pragma once
#include <stdint.h>
+#include <stdbool.h>
#include <osmocom/core/timer.h>
/* our unit is 'milli dB" or "milli dBm", i.e. 1/1000 of a dB(m) */
@@ -59,6 +60,8 @@
struct osmo_timer_list step_timer;
/* call-back called when target is reached */
ramp_compl_cb_t compl_cb;
+ /* set to true after compl_cb has been called (ramp target confirmed by hardware) */
+ bool complete;
} ramp;
};
diff --git a/src/common/bts_shutdown_fsm.c b/src/common/bts_shutdown_fsm.c
index 13a0e1d..a8c8f9d 100644
--- a/src/common/bts_shutdown_fsm.c
+++ b/src/common/bts_shutdown_fsm.c
@@ -110,7 +110,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 > BTS_SHUTDOWN_POWER_RAMP_TGT)
+ !trx->power_params.ramp.complete)
remaining++;
}
diff --git a/src/common/tx_power.c b/src/common/tx_power.c
index 1e026dd..575fe2f 100644
--- a/src/common/tx_power.c
+++ b/src/common/tx_power.c
@@ -210,6 +210,7 @@
/* we had finished in last loop iteration */
if (!first && tpp->ramp.attenuation_mdB == 0) {
+ tpp->ramp.complete = true;
if (tpp->ramp.compl_cb)
tpp->ramp.compl_cb(trx);
return;
@@ -261,6 +262,7 @@
/* set the new target */
tpp->p_total_tgt_mdBm = p_total_tgt_mdBm;
tpp->ramp.compl_cb = ramp_compl_cb;
+ tpp->ramp.complete = false;
if (skip_ramping) {
/* Jump straight to the target power */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42524?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ia71393e871187d6b44b7f520eb421bab354aafd1
Gerrit-Change-Number: 42524
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42522?usp=email )
Change subject: osmo-bts-trx: rx_data_fn(): fix copy-paste in comment
......................................................................
osmo-bts-trx: rx_data_fn(): fix copy-paste in comment
Change-Id: Ibf35c468310a690fd873cf968bb2c44b493ca5ea
---
M src/osmo-bts-trx/sched_lchan_xcch.c
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/osmo-bts-trx/sched_lchan_xcch.c b/src/osmo-bts-trx/sched_lchan_xcch.c
index 0580d33..38e1f1a 100644
--- a/src/osmo-bts-trx/sched_lchan_xcch.c
+++ b/src/osmo-bts-trx/sched_lchan_xcch.c
@@ -117,8 +117,7 @@
/* When SACCH Repetition is active, we may try to decode the
* current SACCH block by including the information from the
- * information from the previous SACCH block. See also:
- * 3GPP TS 44.006, section 11.2 */
+ * previous SACCH block. See also 3GPP TS 44.006, section 11.2 */
if (rep_sacch) {
add_sbits(BUFPOS(bursts_p, 0), BUFPOS(bursts_p, 4));
rc = gsm0503_xcch_decode(l2, BUFPOS(bursts_p, 0), &n_errors, &n_bits_total);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42522?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibf35c468310a690fd873cf968bb2c44b493ca5ea
Gerrit-Change-Number: 42522
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>