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

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Mar 19 13:56:13 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13208 )

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: OS#3782
---
M src/osmo-bts-oc2g/l1_if.c
1 file changed, 14 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified

Objections:
  Pau Espin Pedrol: I would prefer this is not merged as is



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 https://gerrit.osmocom.org/13208
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id3bdc88d28417e422d2c0c33b03be06f1a4706c2
Gerrit-Change-Number: 13208
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190319/22dd4040/attachment.html>


More information about the gerrit-log mailing list