dexter has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-bsc/+/30748 )
Change subject: HACK: enable PDCH after OML is done
......................................................................
HACK: enable PDCH after OML is done
Change-Id: If5251b102c8aa45dfc8cc4ee4e0223d7dc438938
---
M src/osmo-bsc/abis_om2000.c
M src/osmo-bsc/timeslot_fsm.c
2 files changed, 20 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/48/30748/1
diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c
index cf69ded..5223814 100644
--- a/src/osmo-bsc/abis_om2000.c
+++ b/src/osmo-bsc/abis_om2000.c
@@ -2255,6 +2255,8 @@
struct gsm_bts_trx_ts *ts;
/* notify TS is ready */
+ /* TODO: for some reason this event is needed now. It seems to be
+ * problematic to send it at a later point. */
ts = &otfp->trx->ts[otfp->cur_ts_nr];
osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_READY, NULL);
@@ -2285,6 +2287,7 @@
struct nm_statechg_signal_data nsd;
struct nm_statechg_signal_data nsd_bb_transc;
struct gsm_bts_trx *trx = otfp->trx;
+ unsigned int i;
memset(&nsd, 0, sizeof(nsd));
@@ -2316,6 +2319,13 @@
if (fi->proc.parent)
osmo_fsm_inst_dispatch(fi->proc.parent, otfp->done_event, NULL);
+
+ /* TODO: This event has already been sent (see above), however, for
+ * PDCHs the early OML ready notification does not work proberly. This
+ * is the reason why we send the event again for all TS. The TS that
+ * are already active will ignore the event. */
+ for(i = 0; i < ARRAY_SIZE(trx->ts); i++)
+ osmo_fsm_inst_dispatch(trx->ts[i].fi, TS_EV_OML_READY, NULL);
}
static void om2k_trx_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c
index 72db0fa..0bd3234 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -353,6 +353,16 @@
ts->last_errmsg ? : "-");
return;
}
+
+ /* It may be that the TRX mo nm state is still set to administrative. In this case it
won't be possible
+ * to activate the PDCH, so we go back to the NOT INITIALIZED state in order to be able
to try again
+ * later. */
+ if (ts->trx->mo.nm_state.administrative == NM_STATE_LOCKED) {
+ LOG_TS(ts, LOGL_DEBUG, "cannot send RSL command to activate PDCH, the related TRX
MO is still in NM STATE LOCKED!");
+ osmo_fsm_inst_state_chg(fi, TS_ST_NOT_INITIALIZED, 0, 0);
+ return;
+ }
+
osmo_fsm_inst_state_chg(fi, TS_ST_WAIT_PDCH_ACT, CHAN_ACT_DEACT_TIMEOUT,
T_CHAN_ACT_DEACT);
break;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/30748
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If5251b102c8aa45dfc8cc4ee4e0223d7dc438938
Gerrit-Change-Number: 30748
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange