aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/ChannelMgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/hv/ChannelMgmt.c')
-rw-r--r--drivers/staging/hv/ChannelMgmt.c58
1 files changed, 45 insertions, 13 deletions
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 86ce05b4b14..f96cba7fa96 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -89,16 +89,42 @@ VmbusChannelProcessRescindOffer(
89 89
90#define MAX_NUM_DEVICE_CLASSES_SUPPORTED 4 90#define MAX_NUM_DEVICE_CLASSES_SUPPORTED 4
91 91
92static const GUID gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPORTED]= { 92static const struct hv_guid gSupportedDeviceClasses[MAX_NUM_DEVICE_CLASSES_SUPPORTED] = {
93 /* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */ 93 /* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */
94 {.Data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f}},/* Storage - SCSI */ 94 /* Storage - SCSI */
95 {
96 .data = {
97 0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
98 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f
99 }
100 },
101
95 /* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */ 102 /* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */
96 {.Data = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, 0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E}}, /* Network */ 103 /* Network */
104 {
105 .data = {
106 0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46,
107 0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E
108 }
109 },
110
97 /* {CFA8B69E-5B4A-4cc0-B98B-8BA1A1F3F95A} */ 111 /* {CFA8B69E-5B4A-4cc0-B98B-8BA1A1F3F95A} */
98 {.Data = {0x9E, 0xB6, 0xA8, 0xCF, 0x4A, 0x5B, 0xc0, 0x4c, 0xB9, 0x8B, 0x8B, 0xA1, 0xA1, 0xF3, 0xF9, 0x5A}}, /* Input */ 112 /* Input */
99 /* {32412632-86cb-44a2-9b5c-50d1417354f5} */ 113 {
100 {.Data = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5}}, /* IDE */ 114 .data = {
115 0x9E, 0xB6, 0xA8, 0xCF, 0x4A, 0x5B, 0xc0, 0x4c,
116 0xB9, 0x8B, 0x8B, 0xA1, 0xA1, 0xF3, 0xF9, 0x5A
117 }
118 },
101 119
120 /* {32412632-86cb-44a2-9b5c-50d1417354f5} */
121 /* IDE */
122 {
123 .data = {
124 0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
125 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5
126 }
127 },
102}; 128};
103 129
104/* Channel message dispatch table */ 130/* Channel message dispatch table */
@@ -233,8 +259,8 @@ VmbusChannelProcessOffer(
233 { 259 {
234 channel = CONTAINING_RECORD(curr, struct vmbus_channel, ListEntry); 260 channel = CONTAINING_RECORD(curr, struct vmbus_channel, ListEntry);
235 261
236 if (!memcmp(&channel->OfferMsg.Offer.InterfaceType, &newChannel->OfferMsg.Offer.InterfaceType,sizeof(GUID)) && 262 if (!memcmp(&channel->OfferMsg.Offer.InterfaceType, &newChannel->OfferMsg.Offer.InterfaceType,sizeof(struct hv_guid)) &&
237 !memcmp(&channel->OfferMsg.Offer.InterfaceInstance, &newChannel->OfferMsg.Offer.InterfaceInstance, sizeof(GUID))) 263 !memcmp(&channel->OfferMsg.Offer.InterfaceInstance, &newChannel->OfferMsg.Offer.InterfaceInstance, sizeof(struct hv_guid)))
238 { 264 {
239 fNew = false; 265 fNew = false;
240 break; 266 break;
@@ -337,8 +363,8 @@ VmbusChannelOnOffer(
337 VMBUS_CHANNEL_OFFER_CHANNEL* offer = (VMBUS_CHANNEL_OFFER_CHANNEL*)hdr; 363 VMBUS_CHANNEL_OFFER_CHANNEL* offer = (VMBUS_CHANNEL_OFFER_CHANNEL*)hdr;
338 struct vmbus_channel *newChannel; 364 struct vmbus_channel *newChannel;
339 365
340 GUID *guidType; 366 struct hv_guid *guidType;
341 GUID *guidInstance; 367 struct hv_guid *guidInstance;
342 int i; 368 int i;
343 int fSupported=0; 369 int fSupported=0;
344 370
@@ -346,7 +372,7 @@ VmbusChannelOnOffer(
346 372
347 for (i=0; i<MAX_NUM_DEVICE_CLASSES_SUPPORTED; i++) 373 for (i=0; i<MAX_NUM_DEVICE_CLASSES_SUPPORTED; i++)
348 { 374 {
349 if (memcmp(&offer->Offer.InterfaceType, &gSupportedDeviceClasses[i], sizeof(GUID)) == 0) 375 if (memcmp(&offer->Offer.InterfaceType, &gSupportedDeviceClasses[i], sizeof(struct hv_guid)) == 0)
350 { 376 {
351 fSupported = 1; 377 fSupported = 1;
352 break; 378 break;
@@ -370,8 +396,14 @@ VmbusChannelOnOffer(
370 offer->ChildRelId, 396 offer->ChildRelId,
371 offer->MonitorId, 397 offer->MonitorId,
372 offer->MonitorAllocated, 398 offer->MonitorAllocated,
373 guidType->Data[3], guidType->Data[2], guidType->Data[1], guidType->Data[0], guidType->Data[5], guidType->Data[4], guidType->Data[7], guidType->Data[6], guidType->Data[8], guidType->Data[9], guidType->Data[10], guidType->Data[11], guidType->Data[12], guidType->Data[13], guidType->Data[14], guidType->Data[15], 399 guidType->data[3], guidType->data[2], guidType->data[1], guidType->data[0],
374 guidInstance->Data[3], guidInstance->Data[2], guidInstance->Data[1], guidInstance->Data[0], guidInstance->Data[5], guidInstance->Data[4], guidInstance->Data[7], guidInstance->Data[6], guidInstance->Data[8], guidInstance->Data[9], guidInstance->Data[10], guidInstance->Data[11], guidInstance->Data[12], guidInstance->Data[13], guidInstance->Data[14], guidInstance->Data[15]); 400 guidType->data[5], guidType->data[4], guidType->data[7], guidType->data[6],
401 guidType->data[8], guidType->data[9], guidType->data[10], guidType->data[11],
402 guidType->data[12], guidType->data[13], guidType->data[14], guidType->data[15],
403 guidInstance->data[3], guidInstance->data[2], guidInstance->data[1], guidInstance->data[0],
404 guidInstance->data[5], guidInstance->data[4], guidInstance->data[7], guidInstance->data[6],
405 guidInstance->data[8], guidInstance->data[9], guidInstance->data[10], guidInstance->data[11],
406 guidInstance->data[12], guidInstance->data[13], guidInstance->data[14], guidInstance->data[15]);
375 407
376 /* Allocate the channel object and save this offer. */ 408 /* Allocate the channel object and save this offer. */
377 newChannel = AllocVmbusChannel(); 409 newChannel = AllocVmbusChannel();