<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13208">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">oc2g: l1if: delay trx initialization to avoid race condition<br><br>On links with high latency it can happen that RADIO CARRIER OPSTART is<br>carried out to early, even before SET BTS ATTRIBUTES is carried out.<br>This means that important parameters for the initalization are not yet<br>set and the TRX initalization failed. Lets delay the TRX initalization a<br>bit in order to be sure that all BTS attributes are set before the<br>initalization is carried out.<br><br>Change-Id: Id3bdc88d28417e422d2c0c33b03be06f1a4706c2<br>Related: OS3782<br>---<br>M src/osmo-bts-oc2g/l1_if.c<br>1 file changed, 14 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/08/13208/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bts-oc2g/l1_if.c b/src/osmo-bts-oc2g/l1_if.c</span><br><span>index 52ec3e7..e834879 100644</span><br><span>--- a/src/osmo-bts-oc2g/l1_if.c</span><br><span>+++ b/src/osmo-bts-oc2g/l1_if.c</span><br><span>@@ -1494,13 +1494,25 @@</span><br><span>       return 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-int l1if_reset(struct oc2gl1_hdl *hdl)</span><br><span style="color: hsl(120, 100%, 40%);">+/* FIXME: This delays the TRX initalization by 5 sec in order to avoid the</span><br><span style="color: hsl(120, 100%, 40%);">+ * occurrence of a race condition in the OML bringup. This a work around and</span><br><span style="color: hsl(120, 100%, 40%);">+ * should be fixed properly. See also OS#3782, OS#2470 and OS#2469 */</span><br><span style="color: hsl(120, 100%, 40%);">+void l1if_reset_cb(void *arg)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ struct oc2gl1_hdl *hdl = arg;</span><br><span>        struct msgb *msg = sysp_msgb_alloc();</span><br><span>        Oc2g_Prim_t *sysp = msgb_sysprim(msg);</span><br><span>       sysp->id = Oc2g_PrimId_Layer1ResetReq;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   return l1if_req_compl(hdl, msg, reset_compl_cb, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+        l1if_req_compl(hdl, msg, reset_compl_cb, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+int l1if_reset(struct oc2gl1_hdl *hdl)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+       static struct osmo_timer_list T_l1if_reset;</span><br><span style="color: hsl(120, 100%, 40%);">+   osmo_timer_setup(&T_l1if_reset, l1if_reset_cb, hdl);</span><br><span style="color: hsl(120, 100%, 40%);">+      osmo_timer_schedule(&T_l1if_reset, 5, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span> }</span><br><span> </span><br><span> /* set the trace flags within the DSP */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13208">change 13208</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13208"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Id3bdc88d28417e422d2c0c33b03be06f1a4706c2 </div>
<div style="display:none"> Gerrit-Change-Number: 13208 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>