2019-03-29 14:12:17 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-11-06 04:14:04 +08:00
|
|
|
From: Alexander Usyskin <alexander.usyskin@intel.com>
|
|
|
|
Date: Mon, 17 Sep 2018 16:18:07 +0300
|
2019-03-29 14:12:17 +08:00
|
|
|
Subject: [PATCH] mei: flush queues by the host client only
|
2018-11-06 04:14:04 +08:00
|
|
|
|
|
|
|
During queues flush, the me client in most cases is already
|
|
|
|
unlinked hence the me client id is unavailable. The host client
|
|
|
|
structure pointer is enough for identification.
|
|
|
|
The function mei_cl_cmp_id() is dropped as it has no more usage.
|
|
|
|
|
|
|
|
Change-Id: Ie43aed9f807fd15568114587b06455d511725be5
|
|
|
|
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
|
|
|
|
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
|
|
|
|
---
|
|
|
|
drivers/misc/mei/client.c | 21 ++-------------------
|
|
|
|
1 file changed, 2 insertions(+), 19 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
|
2020-10-27 02:14:06 +08:00
|
|
|
index 524b8c0d371b..2774737c1031 100644
|
2018-11-06 04:14:04 +08:00
|
|
|
--- a/drivers/misc/mei/client.c
|
|
|
|
+++ b/drivers/misc/mei/client.c
|
2020-06-21 05:57:46 +08:00
|
|
|
@@ -319,23 +319,6 @@ void mei_me_cl_rm_all(struct mei_device *dev)
|
2018-11-06 04:14:04 +08:00
|
|
|
up_write(&dev->me_clients_rwsem);
|
|
|
|
}
|
|
|
|
|
|
|
|
-/**
|
|
|
|
- * mei_cl_cmp_id - tells if the clients are the same
|
|
|
|
- *
|
|
|
|
- * @cl1: host client 1
|
|
|
|
- * @cl2: host client 2
|
|
|
|
- *
|
|
|
|
- * Return: true - if the clients has same host and me ids
|
|
|
|
- * false - otherwise
|
|
|
|
- */
|
|
|
|
-static inline bool mei_cl_cmp_id(const struct mei_cl *cl1,
|
|
|
|
- const struct mei_cl *cl2)
|
|
|
|
-{
|
|
|
|
- return cl1 && cl2 &&
|
|
|
|
- (cl1->host_client_id == cl2->host_client_id) &&
|
|
|
|
- (mei_cl_me_id(cl1) == mei_cl_me_id(cl2));
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/**
|
|
|
|
* mei_io_cb_free - free mei_cb_private related memory
|
|
|
|
*
|
2020-06-21 05:57:46 +08:00
|
|
|
@@ -420,7 +403,7 @@ static void mei_io_list_flush_cl(struct list_head *head,
|
2018-11-06 04:14:04 +08:00
|
|
|
struct mei_cl_cb *cb, *next;
|
|
|
|
|
|
|
|
list_for_each_entry_safe(cb, next, head, list) {
|
|
|
|
- if (mei_cl_cmp_id(cl, cb->cl))
|
|
|
|
+ if (cl == cb->cl)
|
|
|
|
list_del_init(&cb->list);
|
|
|
|
}
|
|
|
|
}
|
2020-06-21 05:57:46 +08:00
|
|
|
@@ -437,7 +420,7 @@ static void mei_io_tx_list_free_cl(struct list_head *head,
|
2018-11-06 04:14:04 +08:00
|
|
|
struct mei_cl_cb *cb, *next;
|
|
|
|
|
|
|
|
list_for_each_entry_safe(cb, next, head, list) {
|
|
|
|
- if (mei_cl_cmp_id(cl, cb->cl))
|
|
|
|
+ if (cl == cb->cl)
|
|
|
|
mei_tx_cb_dequeue(cb);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--
|
2019-04-08 18:08:36 +08:00
|
|
|
https://clearlinux.org
|
2018-11-06 04:14:04 +08:00
|
|
|
|