Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220430
b: refs/heads/master
c: 5a4df29
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Oct 21, 2010
1 parent 65d09a0 commit 47541cf
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 45 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: b3289aa819979dc75c169e15515ce3d2f0576e71
refs/heads/master: 5a4df29058625ce59f549730817961b293f58d49
79 changes: 35 additions & 44 deletions trunk/drivers/staging/hv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,11 @@ static int NetVscInitializeReceiveBufferWithNetVsp(struct hv_device *Device)
initPacket->Messages.Version1Messages.SendReceiveBuffer.Id = NETVSC_RECEIVE_BUFFER_ID;

/* Send the gpadl notification request */
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device,
initPacket,
sizeof(struct nvsp_message),
(unsigned long)initPacket,
VmbusPacketTypeDataInBand,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
ret = vmbus_sendpacket(Device->channel, initPacket,
sizeof(struct nvsp_message),
(unsigned long)initPacket,
VmbusPacketTypeDataInBand,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) {
DPRINT_ERR(NETVSC,
"unable to send receive buffer's gpadl to netvsp");
Expand Down Expand Up @@ -390,11 +389,11 @@ static int NetVscInitializeSendBufferWithNetVsp(struct hv_device *Device)
initPacket->Messages.Version1Messages.SendReceiveBuffer.Id = NETVSC_SEND_BUFFER_ID;

/* Send the gpadl notification request */
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device,
initPacket, sizeof(struct nvsp_message),
(unsigned long)initPacket,
VmbusPacketTypeDataInBand,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
ret = vmbus_sendpacket(Device->channel, initPacket,
sizeof(struct nvsp_message),
(unsigned long)initPacket,
VmbusPacketTypeDataInBand,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) {
DPRINT_ERR(NETVSC,
"unable to send receive buffer's gpadl to netvsp");
Expand Down Expand Up @@ -446,12 +445,10 @@ static int NetVscDestroyReceiveBuffer(struct netvsc_device *NetDevice)
revokePacket->Header.MessageType = NvspMessage1TypeRevokeReceiveBuffer;
revokePacket->Messages.Version1Messages.RevokeReceiveBuffer.Id = NETVSC_RECEIVE_BUFFER_ID;

ret = NetDevice->Device->Driver->VmbusChannelInterface.SendPacket(
NetDevice->Device,
revokePacket,
sizeof(struct nvsp_message),
(unsigned long)revokePacket,
VmbusPacketTypeDataInBand, 0);
ret = vmbus_sendpacket(NetDevice->Device->channel, revokePacket,
sizeof(struct nvsp_message),
(unsigned long)revokePacket,
VmbusPacketTypeDataInBand, 0);
/*
* If we failed here, we might as well return and
* have a leak rather than continue and a bugchk
Expand Down Expand Up @@ -519,11 +516,10 @@ static int NetVscDestroySendBuffer(struct netvsc_device *NetDevice)
revokePacket->Header.MessageType = NvspMessage1TypeRevokeSendBuffer;
revokePacket->Messages.Version1Messages.RevokeSendBuffer.Id = NETVSC_SEND_BUFFER_ID;

ret = NetDevice->Device->Driver->VmbusChannelInterface.SendPacket(NetDevice->Device,
revokePacket,
sizeof(struct nvsp_message),
(unsigned long)revokePacket,
VmbusPacketTypeDataInBand, 0);
ret = vmbus_sendpacket(NetDevice->Device->channel, revokePacket,
sizeof(struct nvsp_message),
(unsigned long)revokePacket,
VmbusPacketTypeDataInBand, 0);
/*
* If we failed here, we might as well return and have a leak
* rather than continue and a bugchk
Expand Down Expand Up @@ -590,12 +586,11 @@ static int NetVscConnectToVsp(struct hv_device *Device)
DPRINT_INFO(NETVSC, "Sending NvspMessageTypeInit...");

/* Send the init request */
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device,
initPacket,
sizeof(struct nvsp_message),
(unsigned long)initPacket,
VmbusPacketTypeDataInBand,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
ret = vmbus_sendpacket(Device->channel, initPacket,
sizeof(struct nvsp_message),
(unsigned long)initPacket,
VmbusPacketTypeDataInBand,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);

if (ret != 0) {
DPRINT_ERR(NETVSC, "unable to send NvspMessageTypeInit");
Expand Down Expand Up @@ -640,11 +635,10 @@ static int NetVscConnectToVsp(struct hv_device *Device)
ndisVersion & 0xFFFF;

/* Send the init request */
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device,
initPacket,
sizeof(struct nvsp_message),
(unsigned long)initPacket,
VmbusPacketTypeDataInBand, 0);
ret = vmbus_sendpacket(Device->channel, initPacket,
sizeof(struct nvsp_message),
(unsigned long)initPacket,
VmbusPacketTypeDataInBand, 0);
if (ret != 0) {
DPRINT_ERR(NETVSC,
"unable to send NvspMessage1TypeSendNdisVersion");
Expand Down Expand Up @@ -919,12 +913,11 @@ static int NetVscOnSend(struct hv_device *Device,
sizeof(struct nvsp_message),
(unsigned long)Packet);
} else {
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device,
&sendMessage,
sizeof(struct nvsp_message),
(unsigned long)Packet,
VmbusPacketTypeDataInBand,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
ret = vmbus_sendpacket(Device->channel, &sendMessage,
sizeof(struct nvsp_message),
(unsigned long)Packet,
VmbusPacketTypeDataInBand,
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);

}

Expand Down Expand Up @@ -1152,11 +1145,9 @@ static void NetVscSendReceiveCompletion(struct hv_device *Device,

retry_send_cmplt:
/* Send the completion */
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device,
&recvcompMessage,
sizeof(struct nvsp_message),
TransactionId,
VmbusPacketTypeCompletion, 0);
ret = vmbus_sendpacket(Device->channel, &recvcompMessage,
sizeof(struct nvsp_message), TransactionId,
VmbusPacketTypeCompletion, 0);
if (ret == 0) {
/* success */
/* no-op */
Expand Down

0 comments on commit 47541cf

Please sign in to comment.