Files
OpenCellular/chip/g
Carl Hamilton 60ce79badd Allow dcrypto_call() to be invoked from any task.
Before this change, the current task id was cached in dcrypto_init() if
it hadn't already been called. This resulted in the task id of the first
caller to dcrypto_init() being cached until reset.

The cached task id was used when generating notifications that hardware
crypto operations were complete. This was fine as long as the task that
invoked dcrypto_init() was also the task that invoked dcrypto_call(). If
this wasn't the case, the task that invoked dcrypto_init() would be
notified of an event it wasn't expecting and the task that invoked
dcrypto_call() would not be notified and would time out.

This change locks a mutex and then caches the current task id in
dcrypto_call() before invoking the hardware operation so that the
correct task will be notified when the operation has completed.

BRANCH=none
BUG=none
TEST=make -j buildall

Change-Id: I30a920d85359cc990d77c88b1607bbe4cf674206
Reviewed-on: https://chromium-review.googlesource.com/522350
Commit-Ready: Carl Hamilton <carlh@chromium.org>
Tested-by: Marius Schilder <mschilder@chromium.org>
Tested-by: Carl Hamilton <carlh@chromium.org>
Reviewed-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2017-06-14 10:19:19 -07:00
..
2017-06-14 04:34:31 +00:00
2016-04-29 16:07:13 -07:00
2017-06-02 10:38:57 -07:00
2016-11-04 18:31:44 -07:00
2016-11-04 18:31:44 -07:00
2017-05-16 13:37:03 -07:00
2016-02-01 21:17:22 +00:00
2017-01-13 21:48:55 -08:00
2016-11-04 18:31:44 -07:00
2017-05-12 03:25:39 -07:00
2017-03-10 08:34:22 -08:00
2016-07-13 19:09:19 -07:00
2017-05-12 03:25:39 -07:00
2017-03-16 11:25:50 -07:00
2015-04-02 20:27:46 +00:00
2016-10-22 00:01:02 +00:00
2017-05-12 03:25:39 -07:00
2017-05-25 00:14:07 -07:00
2017-03-16 11:25:50 -07:00