mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-01 08:46:36 +09:00
greybus: timesync: Bugfix ping should not result in -EAGAIN
gb_timesync_schedule_synchronous() is currently making a synchronous FrameTime synchronization happen. It does a wait_event_interruptible() and then goes to check the status of the state-machine. Occasionally the state indicates PING - which is a completely valid state and should result in a result code of 0 not -EAGAIN. This patch fixes by making __gb_timesync_get_status() return 0 instead of -EAGAIN for the PING state. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: David Lin <dtwlin@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1455db9e1b
commit
52764bd8aa
@@ -462,9 +462,9 @@ static int __gb_timesync_get_status(struct gb_timesync_svc *timesync_svc)
|
||||
case GB_TIMESYNC_STATE_INIT:
|
||||
case GB_TIMESYNC_STATE_WAIT_SVC:
|
||||
case GB_TIMESYNC_STATE_AUTHORITATIVE:
|
||||
case GB_TIMESYNC_STATE_PING:
|
||||
ret = -EAGAIN;
|
||||
break;
|
||||
case GB_TIMESYNC_STATE_PING:
|
||||
case GB_TIMESYNC_STATE_ACTIVE:
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user