Commit 0b7534b8 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: ap: fix svc handshake protocol check

Fix incorrect SVC handshake protocol check, which would only bail out if
both major and minor protocol versions supported by the SVC differed.

Since we currently only support one version of the protocol, upgrade the
debug message to warning and bail unless the protocol versions match
perfectly for now.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent c020d568
...@@ -91,9 +91,10 @@ static void svc_handshake(struct svc_function_handshake *handshake, ...@@ -91,9 +91,10 @@ static void svc_handshake(struct svc_function_handshake *handshake,
} }
/* A new SVC communication channel, let's verify a supported version */ /* A new SVC communication channel, let's verify a supported version */
if ((handshake->version_major != GREYBUS_VERSION_MAJOR) && if ((handshake->version_major != GREYBUS_VERSION_MAJOR) ||
(handshake->version_minor != GREYBUS_VERSION_MINOR)) { (handshake->version_minor != GREYBUS_VERSION_MINOR)) {
dev_dbg(hd->parent, "received invalid greybus version %d:%d\n", dev_warn(hd->parent,
"received invalid greybus version %u.%u\n",
handshake->version_major, handshake->version_minor); handshake->version_major, handshake->version_minor);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment