diff options
-rw-r--r-- | drivers/staging/hv/storvsc.c | 66 |
1 files changed, 30 insertions, 36 deletions
diff --git a/drivers/staging/hv/storvsc.c b/drivers/staging/hv/storvsc.c index ef01b94d350c..6249cd076a25 100644 --- a/drivers/staging/hv/storvsc.c +++ b/drivers/staging/hv/storvsc.c | |||
@@ -213,12 +213,11 @@ static int StorVscChannelInit(struct hv_device *Device) | |||
213 | 213 | ||
214 | DPRINT_INFO(STORVSC, "BEGIN_INITIALIZATION_OPERATION..."); | 214 | DPRINT_INFO(STORVSC, "BEGIN_INITIALIZATION_OPERATION..."); |
215 | 215 | ||
216 | ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, | 216 | ret = vmbus_sendpacket(Device->channel, vstorPacket, |
217 | vstorPacket, | 217 | sizeof(struct vstor_packet), |
218 | sizeof(struct vstor_packet), | 218 | (unsigned long)request, |
219 | (unsigned long)request, | 219 | VmbusPacketTypeDataInBand, |
220 | VmbusPacketTypeDataInBand, | 220 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); |
221 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); | ||
222 | if (ret != 0) { | 221 | if (ret != 0) { |
223 | DPRINT_ERR(STORVSC, | 222 | DPRINT_ERR(STORVSC, |
224 | "unable to send BEGIN_INITIALIZATION_OPERATION"); | 223 | "unable to send BEGIN_INITIALIZATION_OPERATION"); |
@@ -245,12 +244,11 @@ static int StorVscChannelInit(struct hv_device *Device) | |||
245 | vstorPacket->Version.MajorMinor = VMSTOR_PROTOCOL_VERSION_CURRENT; | 244 | vstorPacket->Version.MajorMinor = VMSTOR_PROTOCOL_VERSION_CURRENT; |
246 | FILL_VMSTOR_REVISION(vstorPacket->Version.Revision); | 245 | FILL_VMSTOR_REVISION(vstorPacket->Version.Revision); |
247 | 246 | ||
248 | ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, | 247 | ret = vmbus_sendpacket(Device->channel, vstorPacket, |
249 | vstorPacket, | 248 | sizeof(struct vstor_packet), |
250 | sizeof(struct vstor_packet), | 249 | (unsigned long)request, |
251 | (unsigned long)request, | 250 | VmbusPacketTypeDataInBand, |
252 | VmbusPacketTypeDataInBand, | 251 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); |
253 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); | ||
254 | if (ret != 0) { | 252 | if (ret != 0) { |
255 | DPRINT_ERR(STORVSC, | 253 | DPRINT_ERR(STORVSC, |
256 | "unable to send BEGIN_INITIALIZATION_OPERATION"); | 254 | "unable to send BEGIN_INITIALIZATION_OPERATION"); |
@@ -277,12 +275,11 @@ static int StorVscChannelInit(struct hv_device *Device) | |||
277 | vstorPacket->StorageChannelProperties.PortNumber = | 275 | vstorPacket->StorageChannelProperties.PortNumber = |
278 | storDevice->PortNumber; | 276 | storDevice->PortNumber; |
279 | 277 | ||
280 | ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, | 278 | ret = vmbus_sendpacket(Device->channel, vstorPacket, |
281 | vstorPacket, | 279 | sizeof(struct vstor_packet), |
282 | sizeof(struct vstor_packet), | 280 | (unsigned long)request, |
283 | (unsigned long)request, | 281 | VmbusPacketTypeDataInBand, |
284 | VmbusPacketTypeDataInBand, | 282 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); |
285 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); | ||
286 | 283 | ||
287 | if (ret != 0) { | 284 | if (ret != 0) { |
288 | DPRINT_ERR(STORVSC, | 285 | DPRINT_ERR(STORVSC, |
@@ -314,12 +311,11 @@ static int StorVscChannelInit(struct hv_device *Device) | |||
314 | vstorPacket->Operation = VStorOperationEndInitialization; | 311 | vstorPacket->Operation = VStorOperationEndInitialization; |
315 | vstorPacket->Flags = REQUEST_COMPLETION_FLAG; | 312 | vstorPacket->Flags = REQUEST_COMPLETION_FLAG; |
316 | 313 | ||
317 | ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, | 314 | ret = vmbus_sendpacket(Device->channel, vstorPacket, |
318 | vstorPacket, | 315 | sizeof(struct vstor_packet), |
319 | sizeof(struct vstor_packet), | 316 | (unsigned long)request, |
320 | (unsigned long)request, | 317 | VmbusPacketTypeDataInBand, |
321 | VmbusPacketTypeDataInBand, | 318 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); |
322 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); | ||
323 | 319 | ||
324 | if (ret != 0) { | 320 | if (ret != 0) { |
325 | DPRINT_ERR(STORVSC, | 321 | DPRINT_ERR(STORVSC, |
@@ -638,12 +634,11 @@ int StorVscOnHostReset(struct hv_device *Device) | |||
638 | vstorPacket->Flags = REQUEST_COMPLETION_FLAG; | 634 | vstorPacket->Flags = REQUEST_COMPLETION_FLAG; |
639 | vstorPacket->VmSrb.PathId = storDevice->PathId; | 635 | vstorPacket->VmSrb.PathId = storDevice->PathId; |
640 | 636 | ||
641 | ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, | 637 | ret = vmbus_sendpacket(Device->channel, vstorPacket, |
642 | vstorPacket, | 638 | sizeof(struct vstor_packet), |
643 | sizeof(struct vstor_packet), | 639 | (unsigned long)&storDevice->ResetRequest, |
644 | (unsigned long)&storDevice->ResetRequest, | 640 | VmbusPacketTypeDataInBand, |
645 | VmbusPacketTypeDataInBand, | 641 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); |
646 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); | ||
647 | if (ret != 0) { | 642 | if (ret != 0) { |
648 | DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d", | 643 | DPRINT_ERR(STORVSC, "Unable to send reset packet %p ret %d", |
649 | vstorPacket, ret); | 644 | vstorPacket, ret); |
@@ -741,12 +736,11 @@ static int StorVscOnIORequest(struct hv_device *Device, | |||
741 | sizeof(struct vstor_packet), | 736 | sizeof(struct vstor_packet), |
742 | (unsigned long)requestExtension); | 737 | (unsigned long)requestExtension); |
743 | } else { | 738 | } else { |
744 | ret = Device->Driver->VmbusChannelInterface.SendPacket(Device, | 739 | ret = vmbus_sendpacket(Device->channel, vstorPacket, |
745 | vstorPacket, | 740 | sizeof(struct vstor_packet), |
746 | sizeof(struct vstor_packet), | 741 | (unsigned long)requestExtension, |
747 | (unsigned long)requestExtension, | 742 | VmbusPacketTypeDataInBand, |
748 | VmbusPacketTypeDataInBand, | 743 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); |
749 | VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); | ||
750 | } | 744 | } |
751 | 745 | ||
752 | if (ret != 0) { | 746 | if (ret != 0) { |