summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/mei_dev.h
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2020-08-18 14:51:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-18 16:44:43 +0300
commitd1376f3d89d5177dae7cae40f3f9fdf73e9bfec9 (patch)
tree045c2bcecb3c06c27ac7793af635da0de5ce5d2a /drivers/misc/mei/mei_dev.h
parent74a9c967aaf6cd1314ef371678f889ad9fcedb2c (diff)
downloadlinux-d1376f3d89d5177dae7cae40f3f9fdf73e9bfec9.tar.xz
mei: add a spin lock to protect rd_completed queue
In order to support vtags we need to access read completed queue out of driver big lock. Add a spin lock to protect rd_completed queue. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20200818115147.2567012-7-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/mei_dev.h')
-rw-r--r--drivers/misc/mei/mei_dev.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index fefa5b53a6d0..1219edea3243 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -217,6 +217,7 @@ struct mei_cl_cb {
* @tx_cb_queued: number of tx callbacks in queue
* @writing_state: state of the tx
* @rd_pending: pending read credits
+ * @rd_completed_lock: protects rd_completed queue
* @rd_completed: completed read
*
* @cldev: device on the mei client bus
@@ -242,6 +243,7 @@ struct mei_cl {
u8 tx_cb_queued;
enum mei_file_transaction_states writing_state;
struct list_head rd_pending;
+ spinlock_t rd_completed_lock; /* protects rd_completed queue */
struct list_head rd_completed;
struct mei_cl_device *cldev;