[PATCH] osmo-bts[master]: trx: avoid deactivating lchan on LCHAN_REL_ACT_REACT

2017-08-31 Thread Max
Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3067

to look at the new patch set (#6).

trx: avoid deactivating lchan on LCHAN_REL_ACT_REACT

* do not deactivate lchan when called with LCHAN_REL_ACT_REACT
* add fixme comment

It's unclear yet if any special steps are required for osmo-bts-trx so
let's just make it compatible with setups [1] using BS_AG_BLKS_RES != 1
for now.

Background: CCCH is auto activated by some OsmoBTS - before we receive
SI3, see 4a8582846281322e8d7dfc577b18767cf35c24d1. To accommodate for
that we deactivate CCCH in common/rsl.c, which triggers BTS-model
specific callback sapi_deactivate_cb() which updates parameters and
activates it again.

In case of osmo-bts-trx there is no auto-activation and (seems to be) no
need in special interaction with hw to activate channel (no
lchan_activate()) hence we can just skip entire
deactivate/setup/activate again routine.

[1] "channel-descrption bs-ag-blks-res N" in OpenBSC config file.

Related: OS#1575
Change-Id: I20b89ba1e43d1414180b083cd1e085eeffe5d513
---
M include/osmo-bts/rsl.h
M src/osmo-bts-trx/l1_if.c
2 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/3067/6

diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index d5d0f1a..ddd756e 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -9,7 +9,7 @@
LCHAN_REL_ACT_RSL,
LCHAN_REL_ACT_PCU,
LCHAN_REL_ACT_OML,
-   LCHAN_REL_ACT_REACT,
+   LCHAN_REL_ACT_REACT, /* remove once auto-activation hack is removed 
from opstart_compl() */
 };
 
 #define LCHAN_FN_DUMMY 0x
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index c629a61..3c11dfd 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -109,6 +109,12 @@
struct phy_instance *pinst = trx_phy_instance(lchan->ts->trx);
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
 
+   if (lchan->rel_act_kind == LCHAN_REL_ACT_REACT) {
+   lchan->rel_act_kind = LCHAN_REL_ACT_RSL;
+   /* FIXME: perform whatever is needed (if any) to set proper 
PCH/AGCH allocation according to
+  3GPP TS 44.018 Table 10.5.2.11.1 using 
num_agch(lchan->ts->trx, "TRX L1"); function */
+   return 0;
+   }
/* set lchan inactive */
lchan_set_state(lchan, LCHAN_S_NONE);
 

-- 
To view, visit https://gerrit.osmocom.org/3067
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I20b89ba1e43d1414180b083cd1e085eeffe5d513
Gerrit-PatchSet: 6
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou 


[PATCH] osmo-bts[master]: trx: avoid deactivating lchan on LCHAN_REL_ACT_REACT

2017-08-29 Thread Max
Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3067

to look at the new patch set (#5).

trx: avoid deactivating lchan on LCHAN_REL_ACT_REACT

* do not deactivate lchan when called with LCHAN_REL_ACT_REACT
* add fixme comment

It's unclear yet if any special steps are required for osmo-bts-trx so
let's just make it compatible with setups [1] using BS_AG_BLKS_RES != 1
for now.

Background: CCCH is activated very early by OsmoBTS - before we receive
SI3, see 4a8582846281322e8d7dfc577b18767cf35c24d1. To accommodate for
that we deactivate CCCH in common/rsl.c, which triggers BTS-model
specific callback sapi_deactivate_cb() which updates parameters and
activates it again.

In case of osmo-bts-trx there (seems to be) no need in special
interaction with hw to activate channel (no lchan_activate()) hence we
can just skip entire deactivate/setup/activate again routine.

[1] "channel-descrption bs-ag-blks-res N" in OpenBSC config file.

Related: OS#1575
Change-Id: I20b89ba1e43d1414180b083cd1e085eeffe5d513
---
M src/osmo-bts-trx/l1_if.c
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/3067/5

diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index c629a61..3c11dfd 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -109,6 +109,12 @@
struct phy_instance *pinst = trx_phy_instance(lchan->ts->trx);
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
 
+   if (lchan->rel_act_kind == LCHAN_REL_ACT_REACT) {
+   lchan->rel_act_kind = LCHAN_REL_ACT_RSL;
+   /* FIXME: perform whatever is needed (if any) to set proper 
PCH/AGCH allocation according to
+  3GPP TS 44.018 Table 10.5.2.11.1 using 
num_agch(lchan->ts->trx, "TRX L1"); function */
+   return 0;
+   }
/* set lchan inactive */
lchan_set_state(lchan, LCHAN_S_NONE);
 

-- 
To view, visit https://gerrit.osmocom.org/3067
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I20b89ba1e43d1414180b083cd1e085eeffe5d513
Gerrit-PatchSet: 5
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bts[master]: trx: avoid deactivating lchan on LCHAN_REL_ACT_REACT

2017-06-28 Thread Max
Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3067

to look at the new patch set (#2).

trx: avoid deactivating lchan on LCHAN_REL_ACT_REACT

* do not deactivate lchan when called with LCHAN_REL_ACT_REACT
* add fixme comment

It's unclear yet if any special steps are required for osmo-bts-trx so
let's just make it compatible with setups [1] using BS_AG_BLKS_RES != 1
for now.

[1] "channel-descrption bs-ag-blks-res N" in OpenBSC config file.

Related: OS#1575
Change-Id: I20b89ba1e43d1414180b083cd1e085eeffe5d513
---
M src/osmo-bts-trx/l1_if.c
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/3067/2

diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index a7bcd2c..7b5bc81 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -151,6 +151,12 @@
struct phy_instance *pinst = trx_phy_instance(lchan->ts->trx);
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
 
+   if (lchan->rel_act_kind == LCHAN_REL_ACT_REACT) {
+   lchan->rel_act_kind = LCHAN_REL_ACT_RSL;
+   /* FIXME: perform whatever is needed (if any) to set proper 
PCH/AGCH allocation according to
+  3GPP TS 44.018 Table 10.5.2.11.1 using 
num_agch(lchan->ts->trx, "TRX L1"); function */
+   return 0;
+   }
/* set lchan inactive */
lchan_set_state(lchan, LCHAN_S_NONE);
 

-- 
To view, visit https://gerrit.osmocom.org/3067
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I20b89ba1e43d1414180b083cd1e085eeffe5d513
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Ivan Kluchnikov 
Gerrit-Reviewer: Jenkins Builder