]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
greybus: connection: compare hd_cport_id for matching SVC protocol
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 24 Jul 2015 13:12:03 +0000 (18:42 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 25 Jul 2015 00:45:26 +0000 (17:45 -0700)
SVC protocol isn't per interface, but per entire entire endo. And so svc
cport id must be matched against hd_cport_id, not per-interface cport
id.

Fixes: 82edfac17e5f ("connection: don't send connected/disconnected events for SVC connection")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.c

index c57deb2053ac58be1ce0bf26a053d2fb76da5466..b32da8af68f47a9adc55a9a087105166ddca1564 100644 (file)
@@ -344,7 +344,8 @@ int gb_connection_init(struct gb_connection *connection)
         * Inform Interface about Active CPorts. We don't need to do this
         * operation for control cport.
         */
-       if (cport_id != GB_CONTROL_CPORT_ID && cport_id != GB_SVC_CPORT_ID) {
+       if (cport_id != GB_CONTROL_CPORT_ID &&
+           connection->hd_cport_id != GB_SVC_CPORT_ID) {
                struct gb_control *control = connection->bundle->intf->control;
 
                ret = gb_control_connected_operation(control, cport_id);
@@ -396,7 +397,8 @@ void gb_connection_exit(struct gb_connection *connection)
         * Inform Interface about In-active CPorts. We don't need to do this
         * operation for control cport.
         */
-       if (cport_id != GB_CONTROL_CPORT_ID && cport_id != GB_SVC_CPORT_ID) {
+       if (cport_id != GB_CONTROL_CPORT_ID &&
+           connection->hd_cport_id != GB_SVC_CPORT_ID) {
                struct gb_control *control = connection->bundle->intf->control;
                int ret;