greybus: control: Mode-switch is a 'core' operation
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 30 May 2016 07:35:09 +0000 (13:05 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 2 Jun 2016 18:15:49 +0000 (11:15 -0700)
commit7ff6e0128a7da5d5a8b51abb09fafeb7b8944792
treef4c2f97cdd1d46b753444f4527da2a871443e82e
parentc92c1d026b1e13f20fee3350975a4986608ff84a
greybus: control: Mode-switch is a 'core' operation

The operation layer allows only the 'core' operations on a connection,
which is in its 'disconnecting' state.

Mode switch is sent at the very end of interface-disable sequence, and
the control connection is already in its 'disconnecting' state at that
time. And so gb_operation_get_active() always fail with error -ENOTCONN.

The operation core already has support for such 'core' operations, just
that we were missing the needed flag while creating the mode switch
operation.

Fix that.

Tested on EVT 1.5 with gpbridge-test module.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Karthik Ravi Shankar <karthikrs@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/control.c