Staging: hv: storvsc: call vmbus_sendpacket directly

Don't do the interface indirection, it's not needed at all.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman
2010-10-21 09:43:56 -07:00
parent 5a4df29058
commit b60d71e2b6
+30 -36
View File
@@ -213,12 +213,11 @@ static int StorVscChannelInit(struct hv_device *Device)
DPRINT_INFO(STORVSC, "BEGIN_INITIALIZATION_OPERATION..."); DPRINT_INFO(STORVSC, "BEGIN_INITIALIZATION_OPERATION...");
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, ret = vmbus_sendpacket(Device->channel, vstorPacket,
vstorPacket, sizeof(struct vstor_packet),
sizeof(struct vstor_packet), (unsigned long)request,
(unsigned long)request, VmbusPacketTypeDataInBand,
VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) { if (ret != 0) {
DPRINT_ERR(STORVSC, DPRINT_ERR(STORVSC,
"unable to send BEGIN_INITIALIZATION_OPERATION"); "unable to send BEGIN_INITIALIZATION_OPERATION");
@@ -245,12 +244,11 @@ static int StorVscChannelInit(struct hv_device *Device)
vstorPacket->Version.MajorMinor = VMSTOR_PROTOCOL_VERSION_CURRENT; vstorPacket->Version.MajorMinor = VMSTOR_PROTOCOL_VERSION_CURRENT;
FILL_VMSTOR_REVISION(vstorPacket->Version.Revision); FILL_VMSTOR_REVISION(vstorPacket->Version.Revision);
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, ret = vmbus_sendpacket(Device->channel, vstorPacket,
vstorPacket, sizeof(struct vstor_packet),
sizeof(struct vstor_packet), (unsigned long)request,
(unsigned long)request, VmbusPacketTypeDataInBand,
VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) { if (ret != 0) {
DPRINT_ERR(STORVSC, DPRINT_ERR(STORVSC,
"unable to send BEGIN_INITIALIZATION_OPERATION"); "unable to send BEGIN_INITIALIZATION_OPERATION");
@@ -277,12 +275,11 @@ static int StorVscChannelInit(struct hv_device *Device)
vstorPacket->StorageChannelProperties.PortNumber = vstorPacket->StorageChannelProperties.PortNumber =
storDevice->PortNumber; storDevice->PortNumber;
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, ret = vmbus_sendpacket(Device->channel, vstorPacket,
vstorPacket, sizeof(struct vstor_packet),
sizeof(struct vstor_packet), (unsigned long)request,
(unsigned long)request, VmbusPacketTypeDataInBand,
VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) { if (ret != 0) {
DPRINT_ERR(STORVSC, DPRINT_ERR(STORVSC,
@@ -314,12 +311,11 @@ static int StorVscChannelInit(struct hv_device *Device)
vstorPacket->Operation = VStorOperationEndInitialization; vstorPacket->Operation = VStorOperationEndInitialization;
vstorPacket->Flags = REQUEST_COMPLETION_FLAG; vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, ret = vmbus_sendpacket(Device->channel, vstorPacket,
vstorPacket, sizeof(struct vstor_packet),
sizeof(struct vstor_packet), (unsigned long)request,
(unsigned long)request, VmbusPacketTypeDataInBand,
VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) { if (ret != 0) {
DPRINT_ERR(STORVSC, DPRINT_ERR(STORVSC,
@@ -638,12 +634,11 @@ int StorVscOnHostReset(struct hv_device *Device)
vstorPacket->Flags = REQUEST_COMPLETION_FLAG; vstorPacket->Flags = REQUEST_COMPLETION_FLAG;
vstorPacket->VmSrb.PathId = storDevice->PathId; vstorPacket->VmSrb.PathId = storDevice->PathId;
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, ret = vmbus_sendpacket(Device->channel, vstorPacket,
vstorPacket, sizeof(struct vstor_packet),
sizeof(struct vstor_packet), (unsigned long)&storDevice->ResetRequest,
(unsigned long)&storDevice->ResetRequest, VmbusPacketTypeDataInBand,
VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
if (ret != 0) { if (ret != 0) {
DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d", DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d",
vstorPacket, ret); vstorPacket, ret);
@@ -741,12 +736,11 @@ static int StorVscOnIORequest(struct hv_device *Device,
sizeof(struct vstor_packet), sizeof(struct vstor_packet),
(unsigned long)requestExtension); (unsigned long)requestExtension);
} else { } else {
ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, ret = vmbus_sendpacket(Device->channel, vstorPacket,
vstorPacket, sizeof(struct vstor_packet),
sizeof(struct vstor_packet), (unsigned long)requestExtension,
(unsigned long)requestExtension, VmbusPacketTypeDataInBand,
VmbusPacketTypeDataInBand, VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
} }
if (ret != 0) { if (ret != 0) {