Commit 563d1b7e authored by Maciej Lipinski's avatar Maciej Lipinski Committed by Jean-Claude BAU

[HAL] bugfix: prevent reseting TIMING_MODE if non-slave port is unplugged

If there were more ports connected than just slave port, unplugging any
of the ports would result (on BC) the timing_mode to be changed to
FREE_MASTER. As a consquence, the port in slave state was reseted and
would re-establishs sync. It was fixed by checking whether the unplugged
port was slave (i.e. was locked)
parent 92acd8b1
......@@ -396,7 +396,14 @@ static void _init_port(struct hal_port_state * ps)
static void _unlock_port( struct hal_port_state * ps)
{
if ( hal_tmg_get_mode()==HAL_TIMING_MODE_BC ) {
/* reset timing mode to FREE (running) MASTER only if
we are on Boundary Clock and the disconnected port
has been locked (i.e. it was a SLAVE). In all other
cases to nothing (e.g. if we did not chekc the locked
flag, we would be unlocking Boundary Clock in the case
of unplugging link from port in Master/Passive state) */
if ( hal_tmg_get_mode()==HAL_TIMING_MODE_BC &&
ps->locked == 1) {
hal_tmg_set_mode(HAL_TIMING_MODE_FREE_MASTER);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment