提交 479327fc 编写于 作者: T Tomas Winkler 提交者: Greg Kroah-Hartman

mei: enable marking internal commands

Set hbm header bit 30 for internal commands
This mark commands that are generated by
the device driver
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 725fc136
...@@ -316,6 +316,7 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb) ...@@ -316,6 +316,7 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb)
mei_hdr.host_addr = dev->iamthif_cl.host_client_id; mei_hdr.host_addr = dev->iamthif_cl.host_client_id;
mei_hdr.me_addr = dev->iamthif_cl.me_client_id; mei_hdr.me_addr = dev->iamthif_cl.me_client_id;
mei_hdr.reserved = 0; mei_hdr.reserved = 0;
mei_hdr.internal = 0;
dev->iamthif_msg_buf_index += mei_hdr.length; dev->iamthif_msg_buf_index += mei_hdr.length;
ret = mei_write_message(dev, &mei_hdr, dev->iamthif_msg_buf); ret = mei_write_message(dev, &mei_hdr, dev->iamthif_msg_buf);
if (ret) if (ret)
...@@ -477,6 +478,7 @@ int mei_amthif_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb, ...@@ -477,6 +478,7 @@ int mei_amthif_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb,
mei_hdr.host_addr = cl->host_client_id; mei_hdr.host_addr = cl->host_client_id;
mei_hdr.me_addr = cl->me_client_id; mei_hdr.me_addr = cl->me_client_id;
mei_hdr.reserved = 0; mei_hdr.reserved = 0;
mei_hdr.internal = 0;
if (*slots >= msg_slots) { if (*slots >= msg_slots) {
mei_hdr.length = len; mei_hdr.length = len;
......
...@@ -727,6 +727,7 @@ int mei_cl_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb, ...@@ -727,6 +727,7 @@ int mei_cl_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb,
mei_hdr.host_addr = cl->host_client_id; mei_hdr.host_addr = cl->host_client_id;
mei_hdr.me_addr = cl->me_client_id; mei_hdr.me_addr = cl->me_client_id;
mei_hdr.reserved = 0; mei_hdr.reserved = 0;
mei_hdr.internal = cb->internal;
if (*slots >= msg_slots) { if (*slots >= msg_slots) {
mei_hdr.length = len; mei_hdr.length = len;
...@@ -826,6 +827,7 @@ int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking) ...@@ -826,6 +827,7 @@ int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking)
mei_hdr.host_addr = cl->host_client_id; mei_hdr.host_addr = cl->host_client_id;
mei_hdr.me_addr = cl->me_client_id; mei_hdr.me_addr = cl->me_client_id;
mei_hdr.reserved = 0; mei_hdr.reserved = 0;
mei_hdr.internal = cb->internal;
rets = mei_write_message(dev, &mei_hdr, buf->data); rets = mei_write_message(dev, &mei_hdr, buf->data);
......
...@@ -111,7 +111,8 @@ struct mei_msg_hdr { ...@@ -111,7 +111,8 @@ struct mei_msg_hdr {
u32 me_addr:8; u32 me_addr:8;
u32 host_addr:8; u32 host_addr:8;
u32 length:9; u32 length:9;
u32 reserved:6; u32 reserved:5;
u32 internal:1;
u32 msg_complete:1; u32 msg_complete:1;
} __packed; } __packed;
......
...@@ -178,6 +178,7 @@ struct mei_cl_cb { ...@@ -178,6 +178,7 @@ struct mei_cl_cb {
unsigned long buf_idx; unsigned long buf_idx;
unsigned long read_time; unsigned long read_time;
struct file *file_object; struct file *file_object;
u32 internal:1;
}; };
/* MEI client instance carried as file->pirvate_data*/ /* MEI client instance carried as file->pirvate_data*/
...@@ -637,9 +638,9 @@ static inline void mei_dbgfs_deregister(struct mei_device *dev) {} ...@@ -637,9 +638,9 @@ static inline void mei_dbgfs_deregister(struct mei_device *dev) {}
int mei_register(struct mei_device *dev); int mei_register(struct mei_device *dev);
void mei_deregister(struct mei_device *dev); void mei_deregister(struct mei_device *dev);
#define MEI_HDR_FMT "hdr:host=%02d me=%02d len=%d comp=%1d" #define MEI_HDR_FMT "hdr:host=%02d me=%02d len=%d internal=%1d comp=%1d"
#define MEI_HDR_PRM(hdr) \ #define MEI_HDR_PRM(hdr) \
(hdr)->host_addr, (hdr)->me_addr, \ (hdr)->host_addr, (hdr)->me_addr, \
(hdr)->length, (hdr)->msg_complete (hdr)->length, (hdr)->internal, (hdr)->msg_complete
#endif #endif
...@@ -115,6 +115,7 @@ int mei_wd_send(struct mei_device *dev) ...@@ -115,6 +115,7 @@ int mei_wd_send(struct mei_device *dev)
hdr.me_addr = dev->wd_cl.me_client_id; hdr.me_addr = dev->wd_cl.me_client_id;
hdr.msg_complete = 1; hdr.msg_complete = 1;
hdr.reserved = 0; hdr.reserved = 0;
hdr.internal = 0;
if (!memcmp(dev->wd_data, mei_start_wd_params, MEI_WD_HDR_SIZE)) if (!memcmp(dev->wd_data, mei_start_wd_params, MEI_WD_HDR_SIZE))
hdr.length = MEI_WD_START_MSG_SIZE; hdr.length = MEI_WD_START_MSG_SIZE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册