fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/42592?usp=email )

Change subject: lchan_fsm: don't mark lchan as BORKEN on unsupported mode NACK
......................................................................

lchan_fsm: don't mark lchan as BORKEN on unsupported mode NACK

When the BTS NACKs a Channel Activation with RSL_ERR_SERV_OPT_UNAVAIL
or RSL_ERR_SERV_OPT_UNIMPL, it means the requested service or channel
mode is not supported - not that the hardware is broken.  In this
case the lchan should transition to LCHAN_ST_WAIT_AFTER_ERROR rather
than LCHAN_ST_BORKEN, which is reserved for genuine hardware failures.

Change-Id: Ide3830a697501a0c245a41451302f1e68d553b3c
Related: osmo-ttcn3-hacks.git I000b7b44749380c5af4da42abe37b4ada6e06ee4
Related: OS#6324
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 14 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  fixeria: Looks good to me, approved




diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 524d66e..afb5cc8 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -977,12 +977,22 @@
                        lchan->release.rsl_error_cause = *(uint8_t*)data;
                        lchan->release.rr_cause = 
bsc_gsm48_rr_cause_from_rsl_cause(lchan->release.rsl_error_cause);
                        lchan->release.in_error = true;
-                       if (lchan->release.rsl_error_cause != 
RSL_ERR_RCH_ALR_ACTV_ALLOC)
-                               next_state = LCHAN_ST_BORKEN;
-                       else
+                       switch (lchan->release.rsl_error_cause) {
+                       case RSL_ERR_RCH_ALR_ACTV_ALLOC:
                                /* Taking this over from legacy code: send an 
RF Chan Release even though
                                 * the Activ was NACKed. Is this really 
correct? */
                                next_state = LCHAN_ST_WAIT_RF_RELEASE_ACK;
+                               break;
+                       case RSL_ERR_SERV_OPT_UNAVAIL:
+                       case RSL_ERR_SERV_OPT_UNIMPL:
+                               /* BTS does not support the requested service 
or mode; the lchan
+                                * itself is not broken, so don't mark it as 
such. */
+                               next_state = LCHAN_ST_WAIT_AFTER_ERROR;
+                               break;
+                       default:
+                               next_state = LCHAN_ST_BORKEN;
+                               break;
+                       }

                        lchan_fail_to(next_state, "Chan Activ NACK: %s (0x%x)",
                                      
rsl_err_name(lchan->release.rsl_error_cause), lchan->release.rsl_error_cause);
@@ -1759,6 +1769,7 @@
                .out_state_mask = 0
                        | S(LCHAN_ST_UNUSED)
                        | S(LCHAN_ST_WAIT_RLL_RTP_ESTABLISH)
+                       | S(LCHAN_ST_WAIT_AFTER_ERROR)
                        | S(LCHAN_ST_BORKEN)
                        | S(LCHAN_ST_WAIT_RF_RELEASE_ACK)
                        ,

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/42592?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ide3830a697501a0c245a41451302f1e68d553b3c
Gerrit-Change-Number: 42592
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>

Reply via email to