Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318244
b: refs/heads/master
c: b45f3cc
h: refs/heads/master
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jul 10, 2012
1 parent 435939e commit bd23e23
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7bdf72d3d8059a50214069ea4b87c2174645f40f
refs/heads/master: b45f3ccf80fb3e9e86bba2ad3640880d6fe85bfc
63 changes: 30 additions & 33 deletions trunk/drivers/misc/mei/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,27 +299,25 @@ static int _mei_irq_thread_close(struct mei_device *dev, s32 *slots,
struct mei_cl *cl,
struct mei_io_list *cmpl_list)
{
if ((*slots * sizeof(u32)) >= (sizeof(struct mei_msg_hdr) +
sizeof(struct hbm_client_disconnect_request))) {
*slots -= mei_data2slots(sizeof(struct hbm_client_disconnect_request));
if ((*slots * sizeof(u32)) < (sizeof(struct mei_msg_hdr) +
sizeof(struct hbm_client_disconnect_request)))
return -EBADMSG;

if (mei_disconnect(dev, cl)) {
cl->status = 0;
cb_pos->information = 0;
list_move_tail(&cb_pos->cb_list,
&cmpl_list->mei_cb.cb_list);
return -EMSGSIZE;
} else {
cl->state = MEI_FILE_DISCONNECTING;
cl->status = 0;
cb_pos->information = 0;
list_move_tail(&cb_pos->cb_list,
&dev->ctrl_rd_list.mei_cb.cb_list);
cl->timer_count = MEI_CONNECT_TIMEOUT;
}
*slots -= mei_data2slots(sizeof(struct hbm_client_disconnect_request));

if (mei_disconnect(dev, cl)) {
cl->status = 0;
cb_pos->information = 0;
list_move_tail(&cb_pos->cb_list,
&cmpl_list->mei_cb.cb_list);
return -EMSGSIZE;
} else {
/* return the cancel routine */
return -EBADMSG;
cl->state = MEI_FILE_DISCONNECTING;
cl->status = 0;
cb_pos->information = 0;
list_move_tail(&cb_pos->cb_list,
&dev->ctrl_rd_list.mei_cb.cb_list);
cl->timer_count = MEI_CONNECT_TIMEOUT;
}

return 0;
Expand Down Expand Up @@ -869,26 +867,25 @@ static int _mei_irq_thread_ioctl(struct mei_device *dev, s32 *slots,
struct mei_cl *cl,
struct mei_io_list *cmpl_list)
{
if ((*slots * sizeof(u32)) >= (sizeof(struct mei_msg_hdr) +
if ((*slots * sizeof(u32)) < (sizeof(struct mei_msg_hdr) +
sizeof(struct hbm_client_connect_request))) {
cl->state = MEI_FILE_CONNECTING;
*slots -= mei_data2slots(sizeof(struct hbm_client_connect_request));
if (mei_connect(dev, cl)) {
cl->status = -ENODEV;
cb_pos->information = 0;
list_del(&cb_pos->cb_list);
return -ENODEV;
} else {
list_move_tail(&cb_pos->cb_list,
&dev->ctrl_rd_list.mei_cb.cb_list);
cl->timer_count = MEI_CONNECT_TIMEOUT;
}
} else {
/* return the cancel routine */
list_del(&cb_pos->cb_list);
return -EBADMSG;
}

cl->state = MEI_FILE_CONNECTING;
*slots -= mei_data2slots(sizeof(struct hbm_client_connect_request));
if (mei_connect(dev, cl)) {
cl->status = -ENODEV;
cb_pos->information = 0;
list_del(&cb_pos->cb_list);
return -ENODEV;
} else {
list_move_tail(&cb_pos->cb_list,
&dev->ctrl_rd_list.mei_cb.cb_list);
cl->timer_count = MEI_CONNECT_TIMEOUT;
}
return 0;
}

Expand Down

0 comments on commit bd23e23

Please sign in to comment.