greybus: connection: implement proper connection closure
authorJohan Hovold <johan@hovoldconsulting.com>
Fri, 27 May 2016 15:26:36 +0000 (17:26 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 27 May 2016 19:24:17 +0000 (12:24 -0700)
commit3de5acfafb3c610bc6f7013a1583852cbc2747f1
tree754df49b802847c5a4889cbbe43906df33200fb8
parent18079ece816b3b272b114b770e636f4e5567b028
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>
drivers/staging/greybus/connection.c
drivers/staging/greybus/connection.h
drivers/staging/greybus/greybus_protocols.h
drivers/staging/greybus/hd.h
drivers/staging/greybus/operation.c