Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267941
b: refs/heads/master
c: 0987ff6
h: refs/heads/master
i:
  267939: 3c88ec3
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Aug 25, 2011
1 parent 3292fe6 commit 0952633
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 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: da06da287d9f2697f247024efbb6e18a764411f8
refs/heads/master: 0987ff696d55ad4454211d0b72615fb52b05aa77
20 changes: 10 additions & 10 deletions trunk/drivers/staging/hv/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
u32 recv_ringbuffer_size, void *userdata, u32 userdatalen,
void (*onchannelcallback)(void *context), void *context)
{
struct vmbus_channel_open_channel *openMsg;
struct vmbus_channel_open_channel *open_msg;
struct vmbus_channel_msginfo *openInfo = NULL;
void *in, *out;
unsigned long flags;
Expand Down Expand Up @@ -183,29 +183,29 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,

init_completion(&openInfo->waitevent);

openMsg = (struct vmbus_channel_open_channel *)openInfo->msg;
openMsg->header.msgtype = CHANNELMSG_OPENCHANNEL;
openMsg->openid = newchannel->offermsg.child_relid;
openMsg->child_relid = newchannel->offermsg.child_relid;
openMsg->ringbuffer_gpadlhandle = newchannel->ringbuffer_gpadlhandle;
openMsg->downstream_ringbuffer_pageoffset = send_ringbuffer_size >>
open_msg = (struct vmbus_channel_open_channel *)openInfo->msg;
open_msg->header.msgtype = CHANNELMSG_OPENCHANNEL;
open_msg->openid = newchannel->offermsg.child_relid;
open_msg->child_relid = newchannel->offermsg.child_relid;
open_msg->ringbuffer_gpadlhandle = newchannel->ringbuffer_gpadlhandle;
open_msg->downstream_ringbuffer_pageoffset = send_ringbuffer_size >>
PAGE_SHIFT;
openMsg->server_contextarea_gpadlhandle = 0;
open_msg->server_contextarea_gpadlhandle = 0;

if (userdatalen > MAX_USER_DEFINED_BYTES) {
err = -EINVAL;
goto errorout;
}

if (userdatalen)
memcpy(openMsg->userdata, userdata, userdatalen);
memcpy(open_msg->userdata, userdata, userdatalen);

spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
list_add_tail(&openInfo->msglistentry,
&vmbus_connection.chn_msg_list);
spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);

ret = vmbus_post_msg(openMsg,
ret = vmbus_post_msg(open_msg,
sizeof(struct vmbus_channel_open_channel));

if (ret != 0)
Expand Down

0 comments on commit 0952633

Please sign in to comment.