lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

February 2023

  • 1 participants
  • 2601 discussions
[M] Change in osmo-pcu[master]: pcu_l1_if: receive E1 connection parameters
by dexter 24 Feb '23

24 Feb '23
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31174 ) Change subject: pcu_l1_if: receive E1 connection parameters ...................................................................... Abandoned This has been merged into the follow up patch as it adds dependencies but does not add any functionality that is useful without the follow up patch. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31174 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1f926b023205a9ecf78d8a8586d6ac21cc73eb0a Gerrit-Change-Number: 31174 Gerrit-PatchSet: 9 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
[L] Change in osmo-pcu[master]: pcu_l1_if_phy: flexible phy access
by dexter 24 Feb '23

24 Feb '23
Attention is currently required from: laforge, pespin, fixeria. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31341 ) Change subject: pcu_l1_if_phy: flexible phy access ...................................................................... Patch Set 9: (1 comment) Patchset: PS9: > well, in the classic (12. […] Technically the BSC can know a lot about the PCU implementation as it knows the BTS type. In some earlier discussion we opted for not having compile-time options as it would make the packaging more difficult. I think that from the technical point of view and the current demand compiletime options should be fine as well. I would tend to opt for using compile time options as it would keep the code simpler. We can add more flexibility when we really need them (e.g. support multiple BTSs, BTSs from different vendors at the same time etc.) As far as this patch is concerned all that is missing right now is a pcu_sock primitive to tell the PCU which PHY should be used. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31341 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I8692d1bd5d137a17cf596ee2914722f419c9978d Gerrit-Change-Number: 31341 Gerrit-PatchSet: 9 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 24 Feb 2023 15:37:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-abis[master]: e1d: Remove useless call of handle_ts_trau_write()
by jolly 24 Feb '23

24 Feb '23
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31501 ) Change subject: e1d: Remove useless call of handle_ts_trau_write() ...................................................................... e1d: Remove useless call of handle_ts_trau_write() handle_ts_trau_write() is called inside handle_ts_trau_read(). There is no need to call it when OSMO_FD_WRITE flag is set, because it is never enabled. Change-Id: Iccddcdb0975e8a043cc395c8908a157f5b376752 --- M src/input/e1d.c 1 file changed, 13 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/01/31501/1 diff --git a/src/input/e1d.c b/src/input/e1d.c index d2c6339..8e8d66f 100644 --- a/src/input/e1d.c +++ b/src/input/e1d.c @@ -276,8 +276,6 @@ case E1INP_TS_TYPE_TRAU: if (what & OSMO_FD_READ) ret = handle_ts_trau_read(bfd); - if (what & OSMO_FD_WRITE) - ret = handle_ts_trau_write(bfd); break; case E1INP_TS_TYPE_RAW: if (what & OSMO_FD_READ) -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31501 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Iccddcdb0975e8a043cc395c8908a157f5b376752 Gerrit-Change-Number: 31501 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-abis[master]: Send raw data with e1d as it arrives from application
by jolly 24 Feb '23

24 Feb '23
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31500 ) Change subject: Send raw data with e1d as it arrives from application ...................................................................... Send raw data with e1d as it arrives from application The application is responsible to send raw data in sync with the raw data it receives. It also cares about sending data in advance, to prevent underruns, if required. The length of data can vary. (Now it is same procedure as with mISDN driver.) OSMO_FD_WRITE flag must be disabled, if there is no message left in the transmit queue. Change-Id: I3e3ef623a02bffe75b168dc42514455b4df1007f --- M src/input/e1d.c 1 file changed, 19 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/00/31500/1 diff --git a/src/input/e1d.c b/src/input/e1d.c index 4ab7c36..d2c6339 100644 --- a/src/input/e1d.c +++ b/src/input/e1d.c @@ -194,15 +194,9 @@ /* get the next msg for this timeslot */ msg = e1inp_tx_ts(e1i_ts, NULL); - if (!msg) + if (!msg) { + osmo_fd_write_disable(bfd); return 0; - - if (msg->len != D_BCHAN_TX_GRAN) { - /* This might lead to a transmit underrun, as we call tx - * from the rx path, as there's no select/poll on dahdi - * */ - LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "unexpected msg->len = %u, " - "expected %u\n", msg->len, D_BCHAN_TX_GRAN); } LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN TX: %s\n", osmo_hexdump(msg->data, msg->len)); @@ -244,9 +238,6 @@ msg->l2h = msg->data; LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN RX: %s\n", msgb_hexdump_l2(msg)); ret = e1inp_rx_ts(e1i_ts, msg, 0, 0); - /* physical layer indicates that data has been sent, - * we thus can send some more data */ - ret = handle_ts_raw_write(bfd); return ret; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I3e3ef623a02bffe75b168dc42514455b4df1007f Gerrit-Change-Number: 31500 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmo-abis[master]: e1d: Add support for HDLC type channels
by jolly 24 Feb '23

24 Feb '23
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31502 ) Change subject: e1d: Add support for HDLC type channels ...................................................................... e1d: Add support for HDLC type channels Change-Id: I2f4b9f7ed6430804ca511c7f5283a16bc13bc2fc --- M src/input/e1d.c 1 file changed, 71 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/02/31502/1 diff --git a/src/input/e1d.c b/src/input/e1d.c index 8e8d66f..f16e955 100644 --- a/src/input/e1d.c +++ b/src/input/e1d.c @@ -242,6 +242,62 @@ return ret; } +/* write to a hdlc channel TS */ +static int handle_ts_hdlc_write(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg; + int ret; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, NULL); + if (!msg) { + osmo_fd_write_disable(bfd); + return 0; + } + + LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "HDLC CHAN TX: %s\n", osmo_hexdump(msg->data, msg->len)); + + ret = write(bfd->fd, msg->data, msg->len); + if (ret < msg->len) + LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "send returns %d instead of %d\n", ret, msg->len); + msgb_free(msg); + + return ret; +} + +#define TSX_ALLOC_SIZE 4096 + +/* read from a hdlc channel TS */ +static int handle_ts_hdlc_read(struct osmo_fd *bfd) +{ + struct e1inp_line *line = bfd->data; + unsigned int ts_nr = bfd->priv_nr; + struct e1inp_ts *e1i_ts = &line->ts[ts_nr-1]; + struct msgb *msg = msgb_alloc(TSX_ALLOC_SIZE, "E1D HDLC TS"); + int ret; + + if (!msg) + return -ENOMEM; + + ret = read(bfd->fd, msg->data, TSX_ALLOC_SIZE); + if (ret < 0) { + LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "read error %d %s\n", ret, strerror(errno)); + msgb_free(msg); + return ret; + } + + msgb_put(msg, ret); + + msg->l2h = msg->data; + LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "HDLC CHAN RX: %s\n", msgb_hexdump_l2(msg)); + ret = e1inp_rx_ts(e1i_ts, msg, 0, 0); + + return ret; +} + static void e1d_write_msg(struct msgb *msg, void *cbdata) { @@ -283,6 +339,12 @@ if (what & OSMO_FD_WRITE) ret = handle_ts_raw_write(bfd); break; + case E1INP_TS_TYPE_HDLC: + if (what & OSMO_FD_READ) + ret = handle_ts_hdlc_read(bfd); + if (what & OSMO_FD_WRITE) + ret = handle_ts_hdlc_write(bfd); + break; default: LOGPITS(e1i_ts, DLINP, LOGL_NOTICE, "unknown/unsupported E1 TS type %u\n", e1i_ts->type); break; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31502 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I2f4b9f7ed6430804ca511c7f5283a16bc13bc2fc Gerrit-Change-Number: 31502 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[master]: pcu_sock: activate/deactivate PDCH on pcu reconnect
by Jenkins Builder 24 Feb '23

24 Feb '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31497 ) Change subject: pcu_sock: activate/deactivate PDCH on pcu reconnect ...................................................................... Patch Set 1: (3 comments) File src/osmo-bsc/timeslot_fsm.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3985): https://gerrit.osmocom.org/c/osmo-bsc/+/31497/comment/5ef68a69_e37315b2 PS1, Line 344: if(is_ericsson_bts(bts) && bts->pcu_state->conn_bfd.fd < 0) { space required before the open parenthesis '(' Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3985): https://gerrit.osmocom.org/c/osmo-bsc/+/31497/comment/893ec656_38b8f0df PS1, Line 543: case TS_EV_PDCH_DEACT: code indent should use tabs where possible Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3985): https://gerrit.osmocom.org/c/osmo-bsc/+/31497/comment/a44bad9e_a447c9cf PS1, Line 543: case TS_EV_PDCH_DEACT: please, no spaces at the start of a line -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31497 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I9ea0c53a5e68a51c781ef43bae71f947cdb95678 Gerrit-Change-Number: 31497 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Fri, 24 Feb 2023 15:08:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-bsc[master]: pcu_sock: print OML alerts from PCU
by dexter 24 Feb '23

24 Feb '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31499 ) Change subject: pcu_sock: print OML alerts from PCU ...................................................................... pcu_sock: print OML alerts from PCU The PCU is able to send OML alerts via the BTS to the BSC. When the PCU operates in co-location to the BSC we just print the alerts in the log directly Change-Id: Id32553556356c2affe32e47ae1c3ae6a514efdce Related: OS#5198 --- M src/osmo-bsc/pcu_sock.c 1 file changed, 17 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/99/31499/1 diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index d1f2c48..38a2229 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -687,6 +687,9 @@ if (rc < 0) return -EINVAL; break; + case PCU_OML_ALERT: + LOGP(DPCU, LOGL_ERROR, "(%s) PCU external alarm: %s\n", gsm_bts_name(bts), txt->text); + break; default: LOGP(DPCU, LOGL_ERROR, "Unknown TXT_IND type %u received\n", txt->type); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31499 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id32553556356c2affe32e47ae1c3ae6a514efdce Gerrit-Change-Number: 31499 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-bsc[master]: timeslot_fsm: fix sourcecode formatting
by dexter 24 Feb '23

24 Feb '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31498 ) Change subject: timeslot_fsm: fix sourcecode formatting ...................................................................... timeslot_fsm: fix sourcecode formatting Change-Id: I1cfd377cd8014e42aa45f9f0da664598ee88e02d --- M include/osmocom/bsc/timeslot_fsm.h 1 file changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/98/31498/1 diff --git a/include/osmocom/bsc/timeslot_fsm.h b/include/osmocom/bsc/timeslot_fsm.h index bcaec1d..ede37f6 100644 --- a/include/osmocom/bsc/timeslot_fsm.h +++ b/include/osmocom/bsc/timeslot_fsm.h @@ -37,9 +37,9 @@ TS_EV_LCHAN_REQUESTED, TS_EV_LCHAN_UNUSED, TS_EV_PDCH_ACT_ACK, - TS_EV_PDCH_ACT_NACK, - TS_EV_PDCH_DEACT_ACK, - TS_EV_PDCH_DEACT_NACK, + TS_EV_PDCH_ACT_NACK, + TS_EV_PDCH_DEACT_ACK, + TS_EV_PDCH_DEACT_NACK, TS_EV_PDCH_DEACT, TS_EV_PDCH_ACT, }; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31498 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I1cfd377cd8014e42aa45f9f0da664598ee88e02d Gerrit-Change-Number: 31498 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[master]: pcu_sock: activate/deactivate PDCH on pcu reconnect
by dexter 24 Feb '23

24 Feb '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31497 ) Change subject: pcu_sock: activate/deactivate PDCH on pcu reconnect ...................................................................... pcu_sock: activate/deactivate PDCH on pcu reconnect When the PCU is disconnected while the BSC keeps running the PDCH should be closed. Also the PDCH should be repopened when the PCU is reconnected. Change-Id: I9ea0c53a5e68a51c781ef43bae71f947cdb95678 Related: OS#5198 --- M doc/timeslot.msc M include/osmocom/bsc/timeslot_fsm.h M src/osmo-bsc/pcu_sock.c M src/osmo-bsc/timeslot_fsm.c 4 files changed, 102 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/97/31497/1 diff --git a/doc/timeslot.msc b/doc/timeslot.msc index 02e7bb3..cf4988d 100644 --- a/doc/timeslot.msc +++ b/doc/timeslot.msc @@ -1,5 +1,5 @@ msc { - bts [label="MS/BTS"], bsc[label="BSC"], bsc_ts[label="BSC timeslot FSM"], bsc_lchan[label="BSC lchan FSM"]; + bts [label="MS/BTS"], bsc[label="BSC"], bsc_ts[label="BSC timeslot FSM"], bsc_lchan[label="BSC lchan FSM"], pcu_sock[label="PCU socket"]; bsc_ts abox bsc_ts [label="NOT_INITIALIZED"]; @@ -88,6 +88,20 @@ bsc_ts rbox bsc_ts [label="Continue at 'IN_USE' above"]; ...; ...; + bts rbox bsc_lchan [label="on PCU disconnect (Ericsson RBS)"]; + bsc_ts abox bsc_ts [label="PDCH"]; + bsc_ts <- pcu_sock [label="TS_EV_PDCH_DEACT"]; + bsc_ts box bsc_ts [label="release PDCH"]; + bsc_ts abox bsc_ts [label="UNUSED"]; + ...; + ...; + bts rbox bsc_lchan [label="on PCU reconnect (Ericsson RBS)"]; + bsc_ts abox bsc_ts [label="PDCH"]; + bsc_ts <- pcu_sock [label="TS_EV_PDCH_ACT"]; + bsc_ts box bsc_ts [label="activate PDCH"]; + bsc_ts abox bsc_ts [label="PDCH"]; + ...; + ...; bts rbox bsc_lchan [label="on erratic event"]; bsc_ts -> bsc_lchan [label="LCHAN_EV_TS_ERROR"]; diff --git a/include/osmocom/bsc/timeslot_fsm.h b/include/osmocom/bsc/timeslot_fsm.h index 526f3cf..bcaec1d 100644 --- a/include/osmocom/bsc/timeslot_fsm.h +++ b/include/osmocom/bsc/timeslot_fsm.h @@ -40,6 +40,8 @@ TS_EV_PDCH_ACT_NACK, TS_EV_PDCH_DEACT_ACK, TS_EV_PDCH_DEACT_NACK, + TS_EV_PDCH_DEACT, + TS_EV_PDCH_ACT, }; void ts_fsm_alloc(struct gsm_bts_trx_ts *ts); diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index add968a..d1f2c48 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -44,6 +44,7 @@ #include <osmocom/bsc/gsm_04_08_rr.h> #include <osmocom/bsc/bts.h> #include <osmocom/bsc/bts_sm.h> +#include <osmocom/bsc/timeslot_fsm.h> static int pcu_sock_send(struct gsm_bts *bts, struct msgb *msg); @@ -790,15 +791,19 @@ #endif /* release PDCH */ - for (i = 0; i < 8; i++) { + for (i = 0; i < PCU_IF_NUM_TRX; i++) { trx = gsm_bts_trx_num(bts, i); if (!trx) break; for (j = 0; j < 8; j++) { ts = &trx->ts[j]; if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED - && ts->pchan_is == GSM_PCHAN_PDCH) { - printf("l1sap_chan_rel(trx,gsm_lchan2chan_nr(ts->lchan));\n"); + && ts->pchan_on_init == GSM_PCHAN_OSMO_DYN + && ts->pchan_is == GSM_PCHAN_PDCH && ts->fi->state == TS_ST_PDCH) { + /* NOTE: We send the deactivation event only when the timeslot is active as PDCH. The + * timeslot FSM will check internally if the PCU is available and make sure the PDCH + * is not activated again. */ + osmo_fsm_inst_dispatch(ts->fi, TS_EV_PDCH_DEACT, NULL); } } } @@ -925,9 +930,16 @@ struct pcu_sock_state *state = (struct pcu_sock_state *)bfd->data; struct osmo_fd *conn_bfd = &state->conn_bfd; struct sockaddr_un un_addr; + struct gsm_bts *bts; + struct gsm_bts_trx *trx; + struct gsm_bts_trx_ts *ts; + int i, j; socklen_t len; int rc; + /* FIXME: allow multiple BTS */ + bts = llist_entry(state->net->bts_list.next, struct gsm_bts, list); + len = sizeof(un_addr); rc = accept(bfd->fd, (struct sockaddr *) &un_addr, &len); if (rc < 0) { @@ -956,6 +968,22 @@ LOGP(DPCU, LOGL_NOTICE, "PCU socket connected to external PCU\n"); + /* activate PDCH */ + for (i = 0; i < PCU_IF_NUM_TRX; i++) { + trx = gsm_bts_trx_num(bts, i); + if (!trx) + break; + for (j = 0; j < 8; j++) { + ts = &trx->ts[j]; + if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED + && ts->pchan_on_init == GSM_PCHAN_OSMO_DYN && ts->fi->state == TS_ST_UNUSED) { + /* NOTE: We send the activation event only when the timeslot is UNUSED. In all other + * cases the timeslot FSM will automatically handle the activation. */ + osmo_fsm_inst_dispatch(ts->fi, TS_EV_PDCH_ACT, NULL); + } + } + } + return 0; } diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c index c7f6130..1ba176f 100644 --- a/src/osmo-bsc/timeslot_fsm.c +++ b/src/osmo-bsc/timeslot_fsm.c @@ -323,11 +323,37 @@ chan_counts_ts_clear(ts); } -static void ts_fsm_unused_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +static void ts_fsm_unused_pdch_act(struct osmo_fsm_inst *fi) { struct gsm_bts_trx_ts *ts = ts_fi_ts(fi); struct gsm_bts *bts = ts->trx->bts; + if (bts->gprs.mode == BTS_GPRS_NONE) { + LOG_TS(ts, LOGL_DEBUG, "GPRS mode is 'none': not activating PDCH.\n"); + return; + } + + if (!ts->pdch_act_allowed) { + LOG_TS(ts, LOGL_DEBUG, "PDCH is disabled for this timeslot," + " either due to a PDCH ACT NACK, or from manual VTY command:" + " not activating PDCH. (last error: %s)\n", + ts->last_errmsg ? : "-"); + return; + } + + if(is_ericsson_bts(bts) && bts->pcu_state->conn_bfd.fd < 0) { + LOG_TS(ts, LOGL_DEBUG, "PCU not connected: not activating PDCH.\n"); + return; + } + + osmo_fsm_inst_state_chg(fi, TS_ST_WAIT_PDCH_ACT, CHAN_ACT_DEACT_TIMEOUT, + T_CHAN_ACT_DEACT); +} + +static void ts_fsm_unused_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + struct gsm_bts_trx_ts *ts = ts_fi_ts(fi); + chan_counts_ts_update(ts); /* We are entering the unused state. There must by definition not be any lchans waiting to be @@ -342,19 +368,7 @@ switch (ts->pchan_on_init) { case GSM_PCHAN_OSMO_DYN: case GSM_PCHAN_TCH_F_PDCH: - if (bts->gprs.mode == BTS_GPRS_NONE) { - LOG_TS(ts, LOGL_DEBUG, "GPRS mode is 'none': not activating PDCH.\n"); - return; - } - if (!ts->pdch_act_allowed) { - LOG_TS(ts, LOGL_DEBUG, "PDCH is disabled for this timeslot," - " either due to a PDCH ACT NACK, or from manual VTY command:" - " not activating PDCH. (last error: %s)\n", - ts->last_errmsg ? : "-"); - return; - } - osmo_fsm_inst_state_chg(fi, TS_ST_WAIT_PDCH_ACT, CHAN_ACT_DEACT_TIMEOUT, - T_CHAN_ACT_DEACT); + ts_fsm_unused_pdch_act(fi); break; case GSM_PCHAN_CCCH_SDCCH4_CBCH: @@ -399,6 +413,10 @@ /* ignored. */ return; + case TS_EV_PDCH_ACT: + ts_fsm_unused_pdch_act(fi); + return; + default: OSMO_ASSERT(false); } @@ -522,6 +540,10 @@ } } + case TS_EV_PDCH_DEACT: + ts_fsm_pdch_deact(fi); + return; + case TS_EV_LCHAN_UNUSED: /* ignored */ return; @@ -880,6 +902,7 @@ .in_event_mask = 0 | S(TS_EV_LCHAN_REQUESTED) | S(TS_EV_LCHAN_UNUSED) + | S(TS_EV_PDCH_ACT) , .out_state_mask = 0 | S(TS_ST_WAIT_PDCH_ACT) @@ -912,6 +935,7 @@ .in_event_mask = 0 | S(TS_EV_LCHAN_REQUESTED) | S(TS_EV_LCHAN_UNUSED) + | S(TS_EV_PDCH_DEACT) , .out_state_mask = 0 | S(TS_ST_WAIT_PDCH_DEACT) @@ -983,6 +1007,8 @@ OSMO_VALUE_STRING(TS_EV_PDCH_ACT_NACK), OSMO_VALUE_STRING(TS_EV_PDCH_DEACT_ACK), OSMO_VALUE_STRING(TS_EV_PDCH_DEACT_NACK), + OSMO_VALUE_STRING(TS_EV_PDCH_DEACT), + OSMO_VALUE_STRING(TS_EV_PDCH_ACT), {} }; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31497 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I9ea0c53a5e68a51c781ef43bae71f947cdb95678 Gerrit-Change-Number: 31497 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-bsc[master]: WIP Ericsson GPRS support
by dexter 24 Feb '23

24 Feb '23
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30749 ) Change subject: WIP Ericsson GPRS support ...................................................................... Abandoned This is no longer needed -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30749 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: If96b3f1e26a7206fcd2658b6faf6afe556cfbb14 Gerrit-Change-Number: 30749 Gerrit-PatchSet: 22 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • ...
  • 261
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.