From: Johan Hovold Date: Thu, 19 Mar 2015 15:46:14 +0000 (+0100) Subject: greybus: ap: fix svc handshake protocol check X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1674 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0b7534b86d672752babd18e061b0d869781e3615;p=karo-tx-linux.git 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: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/ap.c b/drivers/staging/greybus/ap.c index 3e4d4fbfd7fc..d5edef90df48 100644 --- a/drivers/staging/greybus/ap.c +++ b/drivers/staging/greybus/ap.c @@ -91,9 +91,10 @@ static void svc_handshake(struct svc_function_handshake *handshake, } /* 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)) { - 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); return; }