summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.h
diff options
context:
space:
mode:
authorJohan Hovold2016-05-27 17:26:36 +0200
committerGreg Kroah-Hartman2016-05-27 21:24:17 +0200
commit3de5acfafb3c610bc6f7013a1583852cbc2747f1 (patch)
tree754df49b802847c5a4889cbbe43906df33200fb8 /drivers/staging/greybus/connection.h
parentgreybus: operation: add helper for creating core operations (diff)
downloadkernel-qcow2-linux-3de5acfafb3c610bc6f7013a1583852cbc2747f1.tar.gz
kernel-qcow2-linux-3de5acfafb3c610bc6f7013a1583852cbc2747f1.tar.xz
kernel-qcow2-linux-3de5acfafb3c610bc6f7013a1583852cbc2747f1.zip
greybus: connection: implement proper connection closure
Implement proper connection closure, which includes sending ping requests on the connection being tore down while coordinating with the remote interface as well as the SVC. This specifically implements the new ping operation, which in case of offloaded connections is handled by the host-device driver in an implementation-defined manner through a new callback. Note that the normal connection tear-down procedure is executed in case of failed connection establishment due to failed connected operation. Specifically, the disconnecting request is sent also in case the connected operation never succeeded. This is needed since the interface may have enabled FCT flow upon receiving the connected request. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.h')
-rw-r--r--drivers/staging/greybus/connection.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h
index 9a35e6196b17..af171f5f0635 100644
--- a/drivers/staging/greybus/connection.h
+++ b/drivers/staging/greybus/connection.h
@@ -20,9 +20,10 @@
#define GB_CONNECTION_FLAG_CONTROL BIT(4)
enum gb_connection_state {
- GB_CONNECTION_STATE_DISABLED = 0,
- GB_CONNECTION_STATE_ENABLED_TX = 1,
- GB_CONNECTION_STATE_ENABLED = 2,
+ GB_CONNECTION_STATE_DISABLED = 0,
+ GB_CONNECTION_STATE_ENABLED_TX = 1,
+ GB_CONNECTION_STATE_ENABLED = 2,
+ GB_CONNECTION_STATE_DISCONNECTING = 3,
};
struct gb_operation;