summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/mei_dev.h
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2016-11-08 18:26:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-10 13:18:02 +0100
commite0cb6b2f878d210441e8ed232e98454ccc7fd812 (patch)
treea91647d2619efa0ac48d57a44585073bbb078542 /drivers/misc/mei/mei_dev.h
parentfe948dcb2c1223c0da4bc304d87d0253fa06094e (diff)
downloadlinux-e0cb6b2f878d210441e8ed232e98454ccc7fd812.tar.gz
linux-e0cb6b2f878d210441e8ed232e98454ccc7fd812.tar.bz2
linux-e0cb6b2f878d210441e8ed232e98454ccc7fd812.zip
mei: enable to set the internal flag for client write
Prepare the client write functions to set the internal flag in message header. Carry both blocking and internal modes inside the transmit cb, and call internal bus function __mei_cl_send() with send mode bit mask. The Internal flag should be added only on messages generated by the driver. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <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.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 1169fd9e7d02..d50f70b4a05e 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -109,6 +109,17 @@ enum mei_cb_file_ops {
MEI_FOP_NOTIFY_STOP,
};
+/**
+ * enum mei_cl_io_mode - io mode between driver and fw
+ *
+ * @MEI_CL_IO_TX_BLOCKING: send is blocking
+ * @MEI_CL_IO_TX_INTERNAL: internal communication between driver and FW
+ */
+enum mei_cl_io_mode {
+ MEI_CL_IO_TX_BLOCKING = BIT(0),
+ MEI_CL_IO_TX_INTERNAL = BIT(1),
+};
+
/*
* Intel MEI message data struct
*/
@@ -169,6 +180,7 @@ struct mei_cl;
* @fp: pointer to file structure
* @status: io status of the cb
* @internal: communication between driver and FW flag
+ * @blocking: transmission blocking mode
* @completed: the transfer or reception has completed
*/
struct mei_cl_cb {
@@ -180,6 +192,7 @@ struct mei_cl_cb {
const struct file *fp;
int status;
u32 internal:1;
+ u32 blocking:1;
u32 completed:1;
};
@@ -304,7 +317,7 @@ void mei_cl_bus_rescan(struct mei_device *bus);
void mei_cl_bus_rescan_work(struct work_struct *work);
void mei_cl_bus_dev_fixup(struct mei_cl_device *dev);
ssize_t __mei_cl_send(struct mei_cl *cl, u8 *buf, size_t length,
- bool blocking);
+ unsigned int mode);
ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length);
bool mei_cl_bus_rx_event(struct mei_cl *cl);
bool mei_cl_bus_notify_event(struct mei_cl *cl);