]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: svc: double the ping delay timeout
authorGreg Kroah-Hartman <gregkh@google.com>
Tue, 26 Jan 2016 16:57:50 +0000 (08:57 -0800)
committerGreg Kroah-Hartman <gregkh@google.com>
Tue, 26 Jan 2016 17:52:20 +0000 (09:52 -0800)
Sometimes the ping response comes back _right_ after we timed out, as
the svc got its act together and squeaked out the ack, yet we miss it
and reset the whole bus.  Double the delay to hopefully give the svc a
little more of a chance to fix itself.  Odds are, it's still in trouble,
but we can just hold off resetting it for a bit more...

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/svc.c

index 9df3c7a4bb82ca6a850cf191e6e31d165a118e2e..b9e5b856501024458c6a85dd5bc96d4671a2bca2 100644 (file)
@@ -365,8 +365,9 @@ EXPORT_SYMBOL_GPL(gb_svc_intf_set_power_mode);
 
 int gb_svc_ping(struct gb_svc *svc)
 {
-       return gb_operation_sync(svc->connection, GB_SVC_TYPE_PING,
-                                NULL, 0, NULL, 0);
+       return gb_operation_sync_timeout(svc->connection, GB_SVC_TYPE_PING,
+                                        NULL, 0, NULL, 0,
+                                        GB_OPERATION_TIMEOUT_DEFAULT * 2);
 }
 EXPORT_SYMBOL_GPL(gb_svc_ping);