mirror of https://gitee.com/openkylin/linux.git
greybus: connection: add trace events before disabling connection
This is what we are doing elsewhere: - Send enable/create trace events after enabling/creating stuff. - Send disable/remove trace events before disabling/removing stuff. This wasn't followed in a same way while disabling connections. Fix it. Compile tested. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
4ee48a5ecb
commit
0698be0281
|
@ -790,6 +790,8 @@ void gb_connection_disable(struct gb_connection *connection)
|
|||
if (connection->state == GB_CONNECTION_STATE_DISABLED)
|
||||
goto out_unlock;
|
||||
|
||||
trace_gb_connection_disable(connection);
|
||||
|
||||
gb_connection_control_disconnecting(connection);
|
||||
|
||||
spin_lock_irq(&connection->lock);
|
||||
|
@ -808,8 +810,6 @@ void gb_connection_disable(struct gb_connection *connection)
|
|||
|
||||
connection->state = GB_CONNECTION_STATE_DISABLED;
|
||||
|
||||
trace_gb_connection_disable(connection);
|
||||
|
||||
/* control-connection tear down is deferred when mode switching */
|
||||
if (!connection->mode_switch) {
|
||||
gb_connection_svc_connection_destroy(connection);
|
||||
|
@ -829,6 +829,8 @@ void gb_connection_disable_forced(struct gb_connection *connection)
|
|||
if (connection->state == GB_CONNECTION_STATE_DISABLED)
|
||||
goto out_unlock;
|
||||
|
||||
trace_gb_connection_disable(connection);
|
||||
|
||||
spin_lock_irq(&connection->lock);
|
||||
connection->state = GB_CONNECTION_STATE_DISABLED;
|
||||
gb_connection_cancel_operations(connection, -ESHUTDOWN);
|
||||
|
@ -839,8 +841,6 @@ void gb_connection_disable_forced(struct gb_connection *connection)
|
|||
gb_connection_svc_connection_destroy(connection);
|
||||
gb_connection_hd_cport_disable(connection);
|
||||
|
||||
trace_gb_connection_disable(connection);
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&connection->mutex);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue