summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-12 11:04:06 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-08-12 20:55:01 -0700
commit1cb5fa47c54ba045593c4dfede72338107ba2133 (patch)
tree7a52a908b5c08541f89270e989c2590b0c14a412 /drivers/staging/greybus/connection.c
parentd706ef8f1b2add4abbbeacbbaaf0c304b25f4476 (diff)
downloadlinux-stable-1cb5fa47c54ba045593c4dfede72338107ba2133.tar.gz
linux-stable-1cb5fa47c54ba045593c4dfede72338107ba2133.tar.bz2
linux-stable-1cb5fa47c54ba045593c4dfede72338107ba2133.zip
greybus: protocol: send own protocol version while requesting it
The greybus specifications clearly say (for all protocols) that the sender is responsible for sending the highest version of protocol it supports, while it requests the same from the receiver. But the greybus code never followed that. Fix, this by always sending AP's version of the protocol, while requesting the same from svc/module. This also renames 'response' to 'version' in gb_protocol_get_version() as it is used for both request/response. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index eae6ad143d0b..27b64d6c8f2e 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -428,19 +428,7 @@ int gb_connection_init(struct gb_connection *connection)
* this for SVC as that is initiated by the SVC.
*/
if (connection->hd_cport_id != GB_SVC_CPORT_ID) {
- bool send_request = false;
-
- /*
- * We need to send the protocol version of the firmware protocol
- * supported by AP and so this special case.
- */
- if (connection->protocol->id == GREYBUS_PROTOCOL_FIRMWARE)
- send_request = true;
-
- // FIXME: Should we always send the protocol version AP can
- // support ?
-
- ret = gb_protocol_get_version(connection, send_request);
+ ret = gb_protocol_get_version(connection);
if (ret) {
dev_err(&connection->dev,
"Failed to get version CPort-%d (%d)\n",