summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/client.h
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2022-11-16 14:47:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-23 19:43:33 +0100
commit83f47eea742c1152c237398fc040ceba04fc5d76 (patch)
tree523f3c402f976b746e9713aef4faba13aafaa025 /drivers/misc/mei/client.h
parent6865788f5ad998f261e37f6b029d61d3bb7dc373 (diff)
downloadlinux-stable-83f47eea742c1152c237398fc040ceba04fc5d76.tar.gz
linux-stable-83f47eea742c1152c237398fc040ceba04fc5d76.tar.bz2
linux-stable-83f47eea742c1152c237398fc040ceba04fc5d76.zip
mei: add timeout to send
When driver wakes up the firmware from the low power state, it is sending a memory ready message. The send is done via synchronous/blocking function to ensure that firmware is in ready state. However, in case of firmware undergoing reset send might be block forever. To address this issue a timeout is added to blocking write command on the internal bus. Introduce the __mei_cl_send_timeout function to use instead of __mei_cl_send in cases where timeout is required. The mei_cl_write has only two callers and there is no need to split it into two functions. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Link: https://lore.kernel.org/r/20221116124735.2493847-2-alexander.usyskin@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/client.h')
-rw-r--r--drivers/misc/mei/client.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/client.h b/drivers/misc/mei/client.h
index 418056fb1489..9052860bcfe0 100644
--- a/drivers/misc/mei/client.h
+++ b/drivers/misc/mei/client.h
@@ -246,7 +246,7 @@ int mei_cl_connect(struct mei_cl *cl, struct mei_me_client *me_cl,
int mei_cl_irq_connect(struct mei_cl *cl, struct mei_cl_cb *cb,
struct list_head *cmpl_list);
int mei_cl_read_start(struct mei_cl *cl, size_t length, const struct file *fp);
-ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb);
+ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long timeout);
int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb,
struct list_head *cmpl_list);