Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PPSi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
47
Issues
47
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
PPSi
Commits
9519a833
Commit
9519a833
authored
Nov 04, 2019
by
Jean-Claude BAU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BMCA: Update bmc_update_clock_quality() to use clock degradation path B
parent
47d07f02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
bmc.c
proto-standard/bmc.c
+21
-18
No files found.
proto-standard/bmc.c
View file @
9519a833
...
@@ -1376,7 +1376,7 @@ void bmc_update_clock_quality(struct pp_globals *ppg)
...
@@ -1376,7 +1376,7 @@ void bmc_update_clock_quality(struct pp_globals *ppg)
.
timing_mode_state
=
PP_TIMING_MODE_STATE_UNLOCKED
,
.
timing_mode_state
=
PP_TIMING_MODE_STATE_UNLOCKED
,
.
reqClockQuality
=
PP_PTP_CLASS_GM_LOCKED
,
.
reqClockQuality
=
PP_PTP_CLASS_GM_LOCKED
,
.
clockQuality
=
{
.
clockQuality
=
{
.
clockClass
=
PP_PTP_CLASS_GM_UNLOCKED
,
.
clockClass
=
PP_PTP_CLASS_GM_UNLOCKED
_B
,
.
clockAccuracy
=
PP_PTP_ACCURACY_GM_UNLOCKED
,
.
clockAccuracy
=
PP_PTP_ACCURACY_GM_UNLOCKED
,
.
offsetScaledLogVariance
=
PP_PTP_VARIANCE_GM_UNLOCKED
,
.
offsetScaledLogVariance
=
PP_PTP_VARIANCE_GM_UNLOCKED
,
},
},
...
@@ -1386,7 +1386,7 @@ void bmc_update_clock_quality(struct pp_globals *ppg)
...
@@ -1386,7 +1386,7 @@ void bmc_update_clock_quality(struct pp_globals *ppg)
.
timing_mode_state
=
PP_TIMING_MODE_STATE_UNLOCKED
,
.
timing_mode_state
=
PP_TIMING_MODE_STATE_UNLOCKED
,
.
reqClockQuality
=
PP_ARB_CLASS_GM_LOCKED
,
.
reqClockQuality
=
PP_ARB_CLASS_GM_LOCKED
,
.
clockQuality
=
{
.
clockQuality
=
{
.
clockClass
=
PP_ARB_CLASS_GM_UNLOCKED
,
.
clockClass
=
PP_ARB_CLASS_GM_UNLOCKED
_B
,
.
clockAccuracy
=
PP_ARB_ACCURACY_GM_UNLOCKED
,
.
clockAccuracy
=
PP_ARB_ACCURACY_GM_UNLOCKED
,
.
offsetScaledLogVariance
=
PP_ARB_VARIANCE_GM_UNLOCKED
,
.
offsetScaledLogVariance
=
PP_ARB_VARIANCE_GM_UNLOCKED
,
},
},
...
@@ -1394,25 +1394,28 @@ void bmc_update_clock_quality(struct pp_globals *ppg)
...
@@ -1394,25 +1394,28 @@ void bmc_update_clock_quality(struct pp_globals *ppg)
}
}
};
};
if
(
rt_opts_clock_quality_clockClass
>=
128
)
/* We are only interested on configured clock class PP_PTP_CLASS_GM_LOCKED and PP_ARB_CLASS_GM_LOCKED */
return
;
if
(
rt_opts_clock_quality_clockClass
>
PP_MAX_VALUE_GM
)
return
;
/* Exclude also PP_PTP_CLASS_GM_UNLOCKED_B and PP_ARB_CLASS_GM_UNLOCKED_B */
if
((
rt_opts_clock_quality_clockClass
==
PP_PTP_CLASS_GM_LOCKED
)
||
(
rt_opts_clock_quality_clockClass
==
PP_ARB_CLASS_GM_LOCKED
))
{
pp_diag
(
NULL
,
bmc
,
2
,
"GM locked class configured, checking PLL locking
\n
"
);
}
else
if
((
rt_opts_clock_quality_clockClass
==
PP_PTP_CLASS_GM_UNLOCKED
)
||
switch
(
rt_opts_clock_quality_clockClass
)
{
(
rt_opts_clock_quality_clockClass
==
PP_ARB_CLASS_GM_UNLOCKED
))
{
case
PP_PTP_CLASS_GM_LOCKED
:
pp_diag
(
NULL
,
bmc
,
2
,
case
PP_ARB_CLASS_GM_LOCKED
:
"GM unlocked class configured, skipping checking PLL locking
\n
"
);
pp_diag
(
NULL
,
bmc
,
2
,
return
;
"GM locked class configured, checking PLL locking
\n
"
);
}
else
{
break
;
pp_diag
(
NULL
,
bmc
,
2
,
case
PP_PTP_CLASS_GM_UNLOCKED_A
:
"GM unknown clock class configured, skipping checking PLL locking
\n
"
);
case
PP_ARB_CLASS_GM_UNLOCKED_A
:
return
;
pp_diag
(
NULL
,
bmc
,
2
,
"GM unlocked class configured, skipping checking PLL locking
\n
"
);
return
;
default
:
pp_diag
(
NULL
,
bmc
,
2
,
"GM unknown clock class configured, skipping checking PLL locking
\n
"
);
return
;
}
}
/* Get the clock status ( locked, holdover, unlocked ) */
if
(
TOPS
(
INST
(
ppg
,
0
))
->
get_GM_lock_state
(
ppg
,
&
timing_mode_state
)
)
{
if
(
TOPS
(
INST
(
ppg
,
0
))
->
get_GM_lock_state
(
ppg
,
&
timing_mode_state
)
)
{
pp_diag
(
NULL
,
bmc
,
1
,
pp_diag
(
NULL
,
bmc
,
1
,
"Could not get GM locking state, taking old clock class: %i
\n
"
,
"Could not get GM locking state, taking old clock class: %i
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment