diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-12-17 08:56:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-18 19:39:54 -0500 |
commit | 479327fc42737234a1f76f20010334c99110d256 (patch) | |
tree | ff11f80c65c5adf775d8f7277f776b16e05c1c42 /drivers/misc | |
parent | 725fc136432552231f7076fd09e6b57a100de1f8 (diff) |
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: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/mei/amthif.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/client.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/hw.h | 3 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 5 | ||||
-rw-r--r-- | drivers/misc/mei/wd.c | 1 |
5 files changed, 10 insertions, 3 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index d22c6864508b..29fcd57b8315 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c | |||
@@ -316,6 +316,7 @@ static int mei_amthif_send_cmd(struct mei_device *dev, struct mei_cl_cb *cb) | |||
316 | mei_hdr.host_addr = dev->iamthif_cl.host_client_id; | 316 | mei_hdr.host_addr = dev->iamthif_cl.host_client_id; |
317 | mei_hdr.me_addr = dev->iamthif_cl.me_client_id; | 317 | mei_hdr.me_addr = dev->iamthif_cl.me_client_id; |
318 | mei_hdr.reserved = 0; | 318 | mei_hdr.reserved = 0; |
319 | mei_hdr.internal = 0; | ||
319 | dev->iamthif_msg_buf_index += mei_hdr.length; | 320 | dev->iamthif_msg_buf_index += mei_hdr.length; |
320 | ret = mei_write_message(dev, &mei_hdr, dev->iamthif_msg_buf); | 321 | ret = mei_write_message(dev, &mei_hdr, dev->iamthif_msg_buf); |
321 | if (ret) | 322 | if (ret) |
@@ -477,6 +478,7 @@ int mei_amthif_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb, | |||
477 | mei_hdr.host_addr = cl->host_client_id; | 478 | mei_hdr.host_addr = cl->host_client_id; |
478 | mei_hdr.me_addr = cl->me_client_id; | 479 | mei_hdr.me_addr = cl->me_client_id; |
479 | mei_hdr.reserved = 0; | 480 | mei_hdr.reserved = 0; |
481 | mei_hdr.internal = 0; | ||
480 | 482 | ||
481 | if (*slots >= msg_slots) { | 483 | if (*slots >= msg_slots) { |
482 | mei_hdr.length = len; | 484 | mei_hdr.length = len; |
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 6184e854ae1e..f84d332ef059 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c | |||
@@ -727,6 +727,7 @@ int mei_cl_irq_write_complete(struct mei_cl *cl, struct mei_cl_cb *cb, | |||
727 | mei_hdr.host_addr = cl->host_client_id; | 727 | mei_hdr.host_addr = cl->host_client_id; |
728 | mei_hdr.me_addr = cl->me_client_id; | 728 | mei_hdr.me_addr = cl->me_client_id; |
729 | mei_hdr.reserved = 0; | 729 | mei_hdr.reserved = 0; |
730 | mei_hdr.internal = cb->internal; | ||
730 | 731 | ||
731 | if (*slots >= msg_slots) { | 732 | if (*slots >= msg_slots) { |
732 | mei_hdr.length = len; | 733 | mei_hdr.length = len; |
@@ -826,6 +827,7 @@ int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking) | |||
826 | mei_hdr.host_addr = cl->host_client_id; | 827 | mei_hdr.host_addr = cl->host_client_id; |
827 | mei_hdr.me_addr = cl->me_client_id; | 828 | mei_hdr.me_addr = cl->me_client_id; |
828 | mei_hdr.reserved = 0; | 829 | mei_hdr.reserved = 0; |
830 | mei_hdr.internal = cb->internal; | ||
829 | 831 | ||
830 | 832 | ||
831 | rets = mei_write_message(dev, &mei_hdr, buf->data); | 833 | rets = mei_write_message(dev, &mei_hdr, buf->data); |
diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h index cb2f556b4252..dd44e33ad2b6 100644 --- a/drivers/misc/mei/hw.h +++ b/drivers/misc/mei/hw.h | |||
@@ -111,7 +111,8 @@ struct mei_msg_hdr { | |||
111 | u32 me_addr:8; | 111 | u32 me_addr:8; |
112 | u32 host_addr:8; | 112 | u32 host_addr:8; |
113 | u32 length:9; | 113 | u32 length:9; |
114 | u32 reserved:6; | 114 | u32 reserved:5; |
115 | u32 internal:1; | ||
115 | u32 msg_complete:1; | 116 | u32 msg_complete:1; |
116 | } __packed; | 117 | } __packed; |
117 | 118 | ||
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 4a7ee815fab1..d92ca0c93f7f 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -178,6 +178,7 @@ struct mei_cl_cb { | |||
178 | unsigned long buf_idx; | 178 | unsigned long buf_idx; |
179 | unsigned long read_time; | 179 | unsigned long read_time; |
180 | struct file *file_object; | 180 | struct file *file_object; |
181 | u32 internal:1; | ||
181 | }; | 182 | }; |
182 | 183 | ||
183 | /* MEI client instance carried as file->pirvate_data*/ | 184 | /* MEI client instance carried as file->pirvate_data*/ |
@@ -637,9 +638,9 @@ static inline void mei_dbgfs_deregister(struct mei_device *dev) {} | |||
637 | int mei_register(struct mei_device *dev); | 638 | int mei_register(struct mei_device *dev); |
638 | void mei_deregister(struct mei_device *dev); | 639 | void mei_deregister(struct mei_device *dev); |
639 | 640 | ||
640 | #define MEI_HDR_FMT "hdr:host=%02d me=%02d len=%d comp=%1d" | 641 | #define MEI_HDR_FMT "hdr:host=%02d me=%02d len=%d internal=%1d comp=%1d" |
641 | #define MEI_HDR_PRM(hdr) \ | 642 | #define MEI_HDR_PRM(hdr) \ |
642 | (hdr)->host_addr, (hdr)->me_addr, \ | 643 | (hdr)->host_addr, (hdr)->me_addr, \ |
643 | (hdr)->length, (hdr)->msg_complete | 644 | (hdr)->length, (hdr)->internal, (hdr)->msg_complete |
644 | 645 | ||
645 | #endif | 646 | #endif |
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c index 9e354216c163..f70945ed96f6 100644 --- a/drivers/misc/mei/wd.c +++ b/drivers/misc/mei/wd.c | |||
@@ -115,6 +115,7 @@ int mei_wd_send(struct mei_device *dev) | |||
115 | hdr.me_addr = dev->wd_cl.me_client_id; | 115 | hdr.me_addr = dev->wd_cl.me_client_id; |
116 | hdr.msg_complete = 1; | 116 | hdr.msg_complete = 1; |
117 | hdr.reserved = 0; | 117 | hdr.reserved = 0; |
118 | hdr.internal = 0; | ||
118 | 119 | ||
119 | if (!memcmp(dev->wd_data, mei_start_wd_params, MEI_WD_HDR_SIZE)) | 120 | if (!memcmp(dev->wd_data, mei_start_wd_params, MEI_WD_HDR_SIZE)) |
120 | hdr.length = MEI_WD_START_MSG_SIZE; | 121 | hdr.length = MEI_WD_START_MSG_SIZE; |