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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/19405 ) Change subject: bts-trx: Fix handling ADM state change while previous one WIP ...................................................................... bts-trx: Fix handling ADM state change while previous one WIP Fix power ramping if administrative state changes while previous opposite change was already ACKED but power ramping was still ongoing. With previous code, osmo-bts-trx would have sent a NACK and BSc would drop the BTs link as a result. Change-Id: I6c5240710ef6d223651dfb4a8db939b5d2f974ca --- M src/osmo-bts-trx/l1_if.c 1 file changed, 24 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index cd7ecc0..48305b5 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -662,11 +662,29 @@ break; if (mo->procedure_pending) { - LOGPTRX(trx, DL1C, LOGL_ERROR, "Discarding adm change command: " - "pending procedure on RC %d\n", - ((struct gsm_bts_trx *)obj)->nr); - rc = -1; - break; + LOGPTRX(trx, DL1C, LOGL_INFO, + "ADM change received while previous one still WIP\n"); + + if (mo->nm_state.administrative == NM_STATE_LOCKED && + adm_state == NM_STATE_UNLOCKED) { + /* Previous change was UNLOCKED->LOCKED, so we + * were ramping down and we didn't deactivate + * yet, so now simply skip old ramp down compl + * cb, skip TS activation and go for ramp up + * directly. */ + goto ramp_up; + } else if (mo->nm_state.administrative == NM_STATE_UNLOCKED && + adm_state == NM_STATE_LOCKED) { + /* Previous change was LOCKED->UNLOCKED, which + * means TS were also enabled during start of + * ramping up. So we simply need to skip + * ramping up and start ramping down instead, + * disabling TS at the end as usual. Fall + * through usual procedure below. + */ + } else if (mo->nm_state.administrative == adm_state) { + OSMO_ASSERT(0); + } } switch (adm_state) { case NM_STATE_LOCKED: @@ -687,6 +705,7 @@ } trx_set_ts(ts); } +ramp_up: rc = l1if_trx_start_power_ramp(trx, bts_model_chg_adm_state_ramp_compl_cb); if (rc == 0) { mo->nm_state.administrative = adm_state; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/19405 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I6c5240710ef6d223651dfb4a8db939b5d2f974ca Gerrit-Change-Number: 19405 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> 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/20200728/a7ffde92/attachment.htm>