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>
This commit is contained in:
parent
208008c322
commit
02a7eecc6e
|
@ -364,7 +364,7 @@ int mei_amthif_write(struct mei_device *dev, struct mei_cl_cb *cb)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
cb->fop_type = MEI_FOP_IOCTL;
|
cb->fop_type = MEI_FOP_WRITE;
|
||||||
|
|
||||||
if (!list_empty(&dev->amthif_cmd_list.list) ||
|
if (!list_empty(&dev->amthif_cmd_list.list) ||
|
||||||
dev->iamthif_state != MEI_IAMTHIF_IDLE) {
|
dev->iamthif_state != MEI_IAMTHIF_IDLE) {
|
||||||
|
|
|
@ -505,7 +505,7 @@ int mei_cl_connect(struct mei_cl *cl, struct file *file)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
cb->fop_type = MEI_FOP_IOCTL;
|
cb->fop_type = MEI_FOP_CONNECT;
|
||||||
|
|
||||||
if (dev->hbuf_is_ready && !mei_cl_is_other_connecting(cl)) {
|
if (dev->hbuf_is_ready && !mei_cl_is_other_connecting(cl)) {
|
||||||
dev->hbuf_is_ready = false;
|
dev->hbuf_is_ready = false;
|
||||||
|
|
|
@ -507,7 +507,7 @@ static void mei_hbm_cl_connect_res(struct mei_device *dev,
|
||||||
list_del(&pos->list);
|
list_del(&pos->list);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (pos->fop_type == MEI_FOP_IOCTL) {
|
if (pos->fop_type == MEI_FOP_CONNECT) {
|
||||||
if (is_treat_specially_client(cl, rs)) {
|
if (is_treat_specially_client(cl, rs)) {
|
||||||
list_del(&pos->list);
|
list_del(&pos->list);
|
||||||
cl->status = 0;
|
cl->status = 0;
|
||||||
|
|
|
@ -244,8 +244,7 @@ static int mei_cl_irq_read(struct mei_cl *cl, struct mei_cl_cb *cb,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mei_cl_irq_ioctl - processes client ioctl related operation from the
|
* mei_cl_irq_connect - send connect request in irq_thread context
|
||||||
* interrupt thread context - send connection request
|
|
||||||
*
|
*
|
||||||
* @cl: client
|
* @cl: client
|
||||||
* @cb: callback block.
|
* @cb: callback block.
|
||||||
|
@ -254,7 +253,7 @@ static int mei_cl_irq_read(struct mei_cl *cl, struct mei_cl_cb *cb,
|
||||||
*
|
*
|
||||||
* returns 0, OK; otherwise, error.
|
* returns 0, OK; otherwise, error.
|
||||||
*/
|
*/
|
||||||
static int mei_cl_irq_ioctl(struct mei_cl *cl, struct mei_cl_cb *cb,
|
static int mei_cl_irq_connect(struct mei_cl *cl, struct mei_cl_cb *cb,
|
||||||
s32 *slots, struct mei_cl_cb *cmpl_list)
|
s32 *slots, struct mei_cl_cb *cmpl_list)
|
||||||
{
|
{
|
||||||
struct mei_device *dev = cl->dev;
|
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,
|
||||||
u32 msg_slots =
|
u32 msg_slots =
|
||||||
mei_data2slots(sizeof(struct hbm_client_connect_request));
|
mei_data2slots(sizeof(struct hbm_client_connect_request));
|
||||||
|
|
||||||
|
if (mei_cl_is_other_connecting(cl))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (*slots < msg_slots) {
|
if (*slots < msg_slots) {
|
||||||
/* return the cancel routine */
|
/* return the cancel routine */
|
||||||
list_del(&cb->list);
|
list_del(&cb->list);
|
||||||
|
@ -496,11 +498,9 @@ int mei_irq_write_handler(struct mei_device *dev, struct mei_cl_cb *cmpl_list)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MEI_FOP_IOCTL:
|
case MEI_FOP_CONNECT:
|
||||||
/* connect message */
|
/* connect message */
|
||||||
if (mei_cl_is_other_connecting(cl))
|
ret = mei_cl_irq_connect(cl, cb, &slots, cmpl_list);
|
||||||
continue;
|
|
||||||
ret = mei_cl_irq_ioctl(cl, cb, &slots, cmpl_list);
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -130,16 +130,16 @@ enum mei_wd_states {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum mei_cb_file_ops - file operation associated with the callback
|
* enum mei_cb_file_ops - file operation associated with the callback
|
||||||
* @MEI_FOP_READ - read
|
* @MEI_FOP_READ - read
|
||||||
* @MEI_FOP_WRITE - write
|
* @MEI_FOP_WRITE - write
|
||||||
* @MEI_FOP_IOCTL - ioctl
|
* @MEI_FOP_CONNECT - connect
|
||||||
* @MEI_FOP_OPEN - open
|
* @MEI_FOP_OPEN - open
|
||||||
* @MEI_FOP_CLOSE - close
|
* @MEI_FOP_CLOSE - close
|
||||||
*/
|
*/
|
||||||
enum mei_cb_file_ops {
|
enum mei_cb_file_ops {
|
||||||
MEI_FOP_READ = 0,
|
MEI_FOP_READ = 0,
|
||||||
MEI_FOP_WRITE,
|
MEI_FOP_WRITE,
|
||||||
MEI_FOP_IOCTL,
|
MEI_FOP_CONNECT,
|
||||||
MEI_FOP_OPEN,
|
MEI_FOP_OPEN,
|
||||||
MEI_FOP_CLOSE
|
MEI_FOP_CLOSE
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue