aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-05 19:18:58 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-09-05 20:03:46 +0700
commit5a2262da64e62f26d47402656f08b4ced86be7b4 (patch)
tree73cf9b379849197c1609e8fc4fad6274a4a14864
parent6f4db8c620f6ddc7ab1bc137b9b7be27d0e727ca (diff)
osmo-bts-trx: fix trx_init(): do not send OPSTART ACK blindly
It was reported that both osmo-bsc and osmo-bts-trx may end up running in a half-broken state, when everything looks good and the UEs can see the network, but all channel requests get rejected due to "trx not usable" error: lchan_select.c:173 (bts=0) lchan_select_by_type(SDCCH) lchan_select.c:48 looking for lchan CCCH+SDCCH4: (bts=0,trx=0) trx not usable lchan_select.c:48 looking for lchan SDCCH8: (bts=0,trx=0) trx not usable lchan_select.c:239 (bts=0) Failed to select SDCCH channel lchan_select.c:173 (bts=0) lchan_select_by_type(TCH_H) lchan_select.c:48 looking for lchan TCH/H: (bts=0,trx=0) trx not usable lchan_select.c:239 (bts=0) Failed to select TCH_H channel lchan_select.c:173 (bts=0) lchan_select_by_type(TCH_F) lchan_select.c:48 looking for lchan TCH/F: (bts=0,trx=0) trx not usable lchan_select.c:239 (bts=0) Failed to select TCH_F channel As was then figured out, this happens because the Radio Carrier MO (Managed Object) remains Disabled even after the BSC has sent OPSTART and the BTS ACKed it: oml.c:986 OC=RADIO-CARRIER(02) INST=(00,00,ff): Rx OPSTART l1_if.c:614 Rx OPSTART for RADIO-CARRIER MO l1_if.c:201 TRX_PROV(phy0-0)[0x1238c0]{OPEN_POWERON}: Event TRX_PROV_EV_CFG_ENABLE not permitted oml.c:144 OC=RADIO-CARRIER(02) INST=(00,00,ff): Tx Opstart Ack It remains a mistery why the TRX_PROV FSM is already in state OPEN_POWERON, while it's expected to be in state OPEN_POWEROFF, but we definitely should not ACKnowledge the OPSTART if this happens. Send a NACK instead with cause NM_NACK_CANT_PERFORM. Change-Id: I8727460acbf850b84df67a9cbdc25b47dee1fadd Related: SYS#5063
-rw-r--r--src/osmo-bts-trx/l1_if.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index 8cf0823b..430d97e3 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -197,8 +197,11 @@ static int trx_init(struct gsm_bts_trx *trx)
{
struct phy_instance *pinst = trx_phy_instance(trx);
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
+ int rc;
- osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_CFG_ENABLE, (void*)(intptr_t)true);
+ rc = osmo_fsm_inst_dispatch(l1h->provision_fi, TRX_PROV_EV_CFG_ENABLE, (void*)(intptr_t)true);
+ if (rc != 0)
+ return oml_mo_opstart_nack(&trx->mo, NM_NACK_CANT_PERFORM);
if (trx == trx->bts->c0)
lchan_init_lapdm(&trx->ts[0].lchan[CCCH_LCHAN]);