diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2016-01-20 22:51:49 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-01-23 17:38:33 -0800 |
commit | ed7279ae31b0a0a97e832bdd0eb6edb31ec2736f (patch) | |
tree | e10ffdca830b3e6ba3189e7f66e9cfdd7f345278 /drivers/staging/greybus/svc.h | |
parent | 0f65fb1ea268a7268ab97a92d172d26d960a5d92 (diff) |
greybus: svc: add a "watchdog" to check the network health
Now that we have a svc ping command, let's add a watchdog to call it
every so often (1 second at the moment.) If it finds something went
wrong, post a stern message to the kernel log and call:
start unipro_reset
to reset the whole greybus hardware subsystem.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/svc.h')
-rw-r--r-- | drivers/staging/greybus/svc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/greybus/svc.h b/drivers/staging/greybus/svc.h index f3e8479b9438..0f81e97a2e88 100644 --- a/drivers/staging/greybus/svc.h +++ b/drivers/staging/greybus/svc.h @@ -16,6 +16,8 @@ enum gb_svc_state { GB_SVC_STATE_SVC_HELLO, }; +struct gb_svc_watchdog; + struct gb_svc { struct device dev; @@ -33,6 +35,7 @@ struct gb_svc { struct input_dev *input; char *input_phys; + struct gb_svc_watchdog *watchdog; }; #define to_gb_svc(d) container_of(d, struct gb_svc, d) @@ -56,6 +59,8 @@ int gb_svc_intf_set_power_mode(struct gb_svc *svc, u8 intf_id, u8 hs_series, u8 rx_mode, u8 rx_gear, u8 rx_nlanes, u8 flags, u32 quirks); int gb_svc_ping(struct gb_svc *svc); +int gb_svc_watchdog_create(struct gb_svc *svc); +void gb_svc_watchdog_destroy(struct gb_svc *svc); int gb_svc_protocol_init(void); void gb_svc_protocol_exit(void); |