diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-02-12 14:41:51 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-14 14:12:46 -0500 |
commit | 02a7eecc6ee565f5f3af836d56fe25bafcc49c98 (patch) | |
tree | a85f9ac8dc72f2ff1ac10945922c4b4cc91ccf53 | |
parent | 208008c322fd1ffdd07e7fc95910154174ce0ff3 (diff) |
mei: rename MEI_FOP_IOCTL to MEI_FOP_CONNECT
This operation actually only support connection
and not a generic ioctl
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/mei/amthif.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/client.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/hbm.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/interrupt.c | 14 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 12 |
5 files changed, 16 insertions, 16 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index d9f14ef512e6..f88cb26364f5 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c | |||
@@ -364,7 +364,7 @@ int mei_amthif_write(struct mei_device *dev, struct mei_cl_cb *cb) | |||
364 | if (ret) | 364 | if (ret) |
365 | return ret; | 365 | return ret; |
366 | 366 | ||
367 | cb->fop_type = MEI_FOP_IOCTL; | 367 | cb->fop_type = MEI_FOP_WRITE; |
368 | 368 | ||
369 | if (!list_empty(&dev->amthif_cmd_list.list) || | 369 | if (!list_empty(&dev->amthif_cmd_list.list) || |
370 | dev->iamthif_state != MEI_IAMTHIF_IDLE) { | 370 | dev->iamthif_state != MEI_IAMTHIF_IDLE) { |
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 1ee2b9492a82..1d3720697618 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c | |||
@@ -505,7 +505,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file) | |||
505 | goto out; | 505 | goto out; |
506 | } | 506 | } |
507 | 507 | ||
508 | cb->fop_type = MEI_FOP_IOCTL; | 508 | cb->fop_type = MEI_FOP_CONNECT; |
509 | 509 | ||
510 | if (dev->hbuf_is_ready && !mei_cl_is_other_connecting(cl)) { | 510 | if (dev->hbuf_is_ready && !mei_cl_is_other_connecting(cl)) { |
511 | dev->hbuf_is_ready = false; | 511 | dev->hbuf_is_ready = false; |
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c index 0aaf2c515ab7..0c770255bf89 100644 --- a/drivers/misc/mei/hbm.c +++ b/drivers/misc/mei/hbm.c | |||
@@ -507,7 +507,7 @@ static void mei_hbm_cl_connect_res(struct mei_device *dev, | |||
507 | list_del(&pos->list); | 507 | list_del(&pos->list); |
508 | return; | 508 | return; |
509 | } | 509 | } |
510 | if (pos->fop_type == MEI_FOP_IOCTL) { | 510 | if (pos->fop_type == MEI_FOP_CONNECT) { |
511 | if (is_treat_specially_client(cl, rs)) { | 511 | if (is_treat_specially_client(cl, rs)) { |
512 | list_del(&pos->list); | 512 | list_del(&pos->list); |
513 | cl->status = 0; | 513 | cl->status = 0; |
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index f0fbb5179f80..3f0b0b9ce951 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
@@ -244,8 +244,7 @@ static int mei_cl_irq_read(struct mei_cl *cl, struct mei_cl_cb *cb, | |||
244 | 244 | ||
245 | 245 | ||
246 | /** | 246 | /** |
247 | * mei_cl_irq_ioctl - processes client ioctl related operation from the | 247 | * mei_cl_irq_connect - send connect request in irq_thread context |
248 | * interrupt thread context - send connection request | ||
249 | * | 248 | * |
250 | * @cl: client | 249 | * @cl: client |
251 | * @cb: callback block. | 250 | * @cb: callback block. |
@@ -254,7 +253,7 @@ static int mei_cl_irq_read(struct mei_cl *cl, struct mei_cl_cb *cb, | |||
254 | * | 253 | * |
255 | * returns 0, OK; otherwise, error. | 254 | * returns 0, OK; otherwise, error. |
256 | */ | 255 | */ |
257 | static int mei_cl_irq_ioctl(struct mei_cl *cl, struct mei_cl_cb *cb, | 256 | static int mei_cl_irq_connect(struct mei_cl *cl, struct mei_cl_cb *cb, |
258 | s32 *slots, struct mei_cl_cb *cmpl_list) | 257 | s32 *slots, struct mei_cl_cb *cmpl_list) |
259 | { | 258 | { |
260 | struct mei_device *dev = cl->dev; | 259 | struct mei_device *dev = cl->dev; |
@@ -263,6 +262,9 @@ static int mei_cl_irq_ioctl(struct mei_cl *cl, struct mei_cl_cb *cb, | |||
263 | u32 msg_slots = | 262 | u32 msg_slots = |
264 | mei_data2slots(sizeof(struct hbm_client_connect_request)); | 263 | mei_data2slots(sizeof(struct hbm_client_connect_request)); |
265 | 264 | ||
265 | if (mei_cl_is_other_connecting(cl)) | ||
266 | return 0; | ||
267 | |||
266 | if (*slots < msg_slots) { | 268 | if (*slots < msg_slots) { |
267 | /* return the cancel routine */ | 269 | /* return the cancel routine */ |
268 | list_del(&cb->list); | 270 | list_del(&cb->list); |
@@ -496,11 +498,9 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list) | |||
496 | return ret; | 498 | return ret; |
497 | 499 | ||
498 | break; | 500 | break; |
499 | case MEI_FOP_IOCTL: | 501 | case MEI_FOP_CONNECT: |
500 | /* connect message */ | 502 | /* connect message */ |
501 | if (mei_cl_is_other_connecting(cl)) | 503 | ret = mei_cl_irq_connect(cl, cb, &slots, cmpl_list); |
502 | continue; | ||
503 | ret = mei_cl_irq_ioctl(cl, cb, &slots, cmpl_list); | ||
504 | if (ret) | 504 | if (ret) |
505 | return ret; | 505 | return ret; |
506 | 506 | ||
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index f7de95b4cdd9..f2c949ef3f28 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -130,16 +130,16 @@ enum mei_wd_states { | |||
130 | 130 | ||
131 | /** | 131 | /** |
132 | * enum mei_cb_file_ops - file operation associated with the callback | 132 | * enum mei_cb_file_ops - file operation associated with the callback |
133 | * @MEI_FOP_READ - read | 133 | * @MEI_FOP_READ - read |
134 | * @MEI_FOP_WRITE - write | 134 | * @MEI_FOP_WRITE - write |
135 | * @MEI_FOP_IOCTL - ioctl | 135 | * @MEI_FOP_CONNECT - connect |
136 | * @MEI_FOP_OPEN - open | 136 | * @MEI_FOP_OPEN - open |
137 | * @MEI_FOP_CLOSE - close | 137 | * @MEI_FOP_CLOSE - close |
138 | */ | 138 | */ |
139 | enum mei_cb_file_ops { | 139 | enum mei_cb_file_ops { |
140 | MEI_FOP_READ = 0, | 140 | MEI_FOP_READ = 0, |
141 | MEI_FOP_WRITE, | 141 | MEI_FOP_WRITE, |
142 | MEI_FOP_IOCTL, | 142 | MEI_FOP_CONNECT, |
143 | MEI_FOP_OPEN, | 143 | MEI_FOP_OPEN, |
144 | MEI_FOP_CLOSE | 144 | MEI_FOP_CLOSE |
145 | }; | 145 | }; |