Project

General

Profile

Actions

Bug #1944

closed

osmo-bts-sysmo: phy / instance / clock-source never used

Added by neels about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
02/07/2017
Due date:
% Done:

100%

Spec Reference:

Description

osmo-bts-sysmo has a VTY option to set the clock source:

phy 0
 instance 0
  clock-source (tcxo|ocxo|ext|gps)

but apparently this is never used:

osmo-bts/src/osmo-bts-sysmo/l1_if.c

struct femtol1_hdl *l1if_open(struct phy_instance *pinst)
{
  [...]
        fl1h->clk_src = pinst->u.sysmobts.clk_src;
  [...]
#if SUPERFEMTO_API_VERSION >= SUPERFEMTO_API(2,1,0)
        if (fl1h->hw_info.model_nr == 2050) {
                /* On the sysmoBTS 2050, we don't have an OCXO but
                 * start with the TCXO and will sync it with the PPS
                 * of the GPS in case there is a fix. */
                fl1h->clk_src = SuperFemto_ClkSrcId_Tcxo;
                LOGP(DL1C, LOGL_INFO, "Clock source defaulting to GPS 1PPS " 
                        "on sysmoBTS 2050\n");
        } else {
                /* default clock source: OCXO */
                fl1h->clk_src = SuperFemto_ClkSrcId_Ocxo;
        }
#else
        fl1h->clk_src = SF_CLKSRC_OCXO;
#endif

So even though clk_src is first set to the instance's value as from the VTY,
it gets overwritten with a hardcoded default in all code paths right after that.

Also note, the VTY config item clk_src defaults to zero,
which would omit clock calibration (get_clk_cal() returns 0).

The code above should probably have an if (!fl1h->clk_src) condition so that the
hardcoded default is set only when the VTY config item is zero?

Actions #1

Updated by laforge over 6 years ago

  • Assignee changed from 118 to 4368
  • Priority changed from Normal to High
Actions #2

Updated by laforge over 6 years ago

  • Assignee changed from 4368 to msuraev
Actions #3

Updated by msuraev over 6 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

Gerrit 4224 and 4225 should fix the issue.

Actions #4

Updated by msuraev over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Merged.

Actions #5

Updated by laforge about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)