Change in osmo-bts[master]: nm_bts_fsm: Make sure PHYs are opened when SW_ACTivating it

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Tue Sep 21 16:56:21 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/25530 )


Change subject: nm_bts_fsm: Make sure PHYs are opened when SW_ACTivating it
......................................................................

nm_bts_fsm: Make sure PHYs are opened when SW_ACTivating it

Since recently we support shutting down phys when BTS goes into shutdown
mode. Let's make sure they are opened again when we connect again to the
BSC.

Change-Id: Ia1df6f4a1e0e6daeffe7303d518776a04b023930
---
M src/common/nm_bts_fsm.c
1 file changed, 14 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/25530/1

diff --git a/src/common/nm_bts_fsm.c b/src/common/nm_bts_fsm.c
index 54737bf..ac8a74d 100644
--- a/src/common/nm_bts_fsm.c
+++ b/src/common/nm_bts_fsm.c
@@ -65,10 +65,24 @@
 static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data)
 {
 	struct gsm_bts *bts = (struct gsm_bts *)fi->priv;
+	struct gsm_bts_trx *trx;
 
 	switch (event) {
 	case NM_EV_SW_ACT:
 		oml_mo_tx_sw_act_rep(&bts->mo);
+
+		llist_for_each_entry(trx, &bts->trx_list, list) {
+			/* During startup, phy_links are already opened, but if we are
+			 * re-connecting, phy_link was closed when disconnected from
+			 * previous BSC, so let's re-open it.
+			 */
+			struct phy_instance *pinst = trx_phy_instance(trx);
+			struct phy_link *plink = pinst->phy_link;
+			if (phy_link_state_get(plink) == PHY_LINK_SHUTDOWN) {
+				bts_model_phy_link_open(plink);
+			}
+		}
+
 		nm_bts_fsm_state_chg(fi, NM_BTS_ST_OP_DISABLED_OFFLINE);
 		return;
 	default:

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25530
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ia1df6f4a1e0e6daeffe7303d518776a04b023930
Gerrit-Change-Number: 25530
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210921/750faf2b/attachment.htm>


More information about the gerrit-log mailing list