phc2sys: fix overwriting of the clock state
The reconfigure function is missing a check whether state for the given clock actually changed or not. This caused state for all unchanged ports to be zeroed. Reported-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Jiri Benc <jbenc@redhat.com>master
parent
7144aa9263
commit
7455c24148
10
phc2sys.c
10
phc2sys.c
|
@ -305,11 +305,13 @@ static void reconfigure(struct node *node)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (c->new_state == PS_MASTER)
|
||||
clock_reinit(c);
|
||||
if (c->new_state) {
|
||||
if (c->new_state == PS_MASTER)
|
||||
clock_reinit(c);
|
||||
|
||||
c->state = c->new_state;
|
||||
c->new_state = 0;
|
||||
c->state = c->new_state;
|
||||
c->new_state = 0;
|
||||
}
|
||||
|
||||
if (c->state == PS_SLAVE) {
|
||||
src = c;
|
||||
|
|
Loading…
Reference in New Issue