greybus: operation: add completion work queue
authorJohan Hovold <johan@hovoldconsulting.com>
Thu, 23 Jul 2015 08:50:03 +0000 (10:50 +0200)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 23 Jul 2015 19:55:25 +0000 (12:55 -0700)
commit701615f82f29d0cce28a397267f847de3ee93b6e
tree62c834ecdb098d31e62effca7e807aff0513744e
parent5a5bc354c65d9e5f255f1861212ec5fa4852a891
greybus: operation: add completion work queue

Add dedicated bound work queue for operation completions and use the
connection work queues for incoming requests only.

There is no need to keep responses ordered internally or with respect to
requests. Instead allow operations to complete as soon as possible when
a response arrives (or the operation is cancelled).

Note that this also allows synchronous requests to be submitted from
request handlers as responses will no longer be blocked on the same
single-threaded work queue. Similarly, operations can now also be
cancelled from a request handler.

Tested-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/operation.c