Change in osmo-bts[master]: oc2g: l1if: delay trx initialization to avoid race condition

dexter gerrit-no-reply at
Mon Mar 11 17:22:03 UTC 2019

dexter has uploaded this change for review. (

Change subject: oc2g: l1if: delay trx initialization to avoid race condition

oc2g: l1if: delay trx initialization to avoid race condition

On links with high latency it can happen that RADIO CARRIER OPSTART is
carried out to early, even before SET BTS ATTRIBUTES is carried out.
This means that important parameters for the initalization are not yet
set and the TRX initalization failed. Lets delay the TRX initalization a
bit in order to be sure that all BTS attributes are set before the
initalization is carried out.

Change-Id: Id3bdc88d28417e422d2c0c33b03be06f1a4706c2
Related: OS3782
M src/osmo-bts-oc2g/l1_if.c
1 file changed, 14 insertions(+), 2 deletions(-)

  git pull ssh:// refs/changes/08/13208/1

diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c
index 52ec3e7..e834879 100644
--- a/src/osmo-bts-oc2g/l1_if.c
+++ b/src/osmo-bts-oc2g/l1_if.c
@@ -1494,13 +1494,25 @@
 	return 0;
-int l1if_reset(struct oc2gl1_hdl *hdl)
+/* FIXME: This delays the TRX initalization by 5 sec in order to avoid the
+ * occurrence of a race condition in the OML bringup. This a work around and
+ * should be fixed properly. See also OS#3782, OS#2470 and OS#2469 */
+void l1if_reset_cb(void *arg)
+	struct oc2gl1_hdl *hdl = arg;
 	struct msgb *msg = sysp_msgb_alloc();
 	Oc2g_Prim_t *sysp = msgb_sysprim(msg);
 	sysp->id = Oc2g_PrimId_Layer1ResetReq;
-	return l1if_req_compl(hdl, msg, reset_compl_cb, NULL);
+	l1if_req_compl(hdl, msg, reset_compl_cb, NULL);
+int l1if_reset(struct oc2gl1_hdl *hdl)
+	static struct osmo_timer_list T_l1if_reset;
+	osmo_timer_setup(&T_l1if_reset, l1if_reset_cb, hdl);
+	osmo_timer_schedule(&T_l1if_reset, 5, 0);
+	return 0;
 /* set the trace flags within the DSP */

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3bdc88d28417e422d2c0c33b03be06f1a4706c2
Gerrit-Change-Number: 13208
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list