Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153663440
D7092.id18119.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D7092.id18119.diff
View Options
Index: sys/dev/hyperv/include/hyperv.h
===================================================================
--- sys/dev/hyperv/include/hyperv.h
+++ sys/dev/hyperv/include/hyperv.h
@@ -121,25 +121,13 @@
((HV_ALIGN_UP(addr+len, PAGE_SIZE) - \
HV_ALIGN_DOWN(addr, PAGE_SIZE)) >> PAGE_SHIFT )
-typedef struct hv_guid {
- uint8_t data[16];
-} __packed hv_guid;
+struct hyperv_guid {
+ uint8_t hv_guid[16];
+} __packed;
#define HYPERV_GUID_STRLEN 40
-int hyperv_guid2str(const struct hv_guid *, char *, size_t);
-
-#define HV_NIC_GUID \
- .data = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, \
- 0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E}
-
-#define HV_IDE_GUID \
- .data = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, \
- 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5}
-
-#define HV_SCSI_GUID \
- .data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, \
- 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f}
+int hyperv_guid2str(const struct hyperv_guid *, char *, size_t);
/*
* At the center of the Channel Management library is
@@ -148,8 +136,8 @@
*/
typedef struct hv_vmbus_channel_offer {
- hv_guid interface_type;
- hv_guid interface_instance;
+ struct hyperv_guid interface_type;
+ struct hyperv_guid interface_instance;
uint64_t interrupt_latency_in_100ns_units;
uint32_t interface_revision;
uint32_t server_context_area_size; /* in bytes */
@@ -477,8 +465,8 @@
TAILQ_ENTRY(hv_vmbus_channel) ch_link;
uint32_t ch_subidx; /* subchan index */
- struct hv_guid ch_guid_type;
- struct hv_guid ch_guid_inst;
+ struct hyperv_guid ch_guid_type;
+ struct hyperv_guid ch_guid_inst;
struct sysctl_ctx_list ch_sysctl_ctx;
} hv_vmbus_channel;
Index: sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
===================================================================
--- sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -399,8 +399,8 @@
}
/* {F8615163-DF3E-46c5-913F-F2D2F965ED0E} */
-static const hv_guid g_net_vsc_device_type = {
- .data = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46,
+static const struct hyperv_guid g_net_vsc_device_type = {
+ .hv_guid = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46,
0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E}
};
Index: sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
===================================================================
--- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
+++ sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
@@ -180,14 +180,14 @@
#define HV_STORAGE_SUPPORTS_MULTI_CHANNEL 0x1
/* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */
-static const hv_guid gStorVscDeviceType={
- .data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
+static const struct hyperv_guid gStorVscDeviceType={
+ .hv_guid = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f}
};
/* {32412632-86cb-44a2-9b5c-50d1417354f5} */
-static const hv_guid gBlkVscDeviceType={
- .data = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
+static const struct hyperv_guid gBlkVscDeviceType={
+ .hv_guid = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5}
};
Index: sys/dev/hyperv/utilities/hv_heartbeat.c
===================================================================
--- sys/dev/hyperv/utilities/hv_heartbeat.c
+++ sys/dev/hyperv/utilities/hv_heartbeat.c
@@ -39,7 +39,7 @@
#include "vmbus_if.h"
/* Heartbeat Service */
-static const hv_guid service_guid = { .data =
+static const struct hyperv_guid service_guid = { .hv_guid =
{0x39, 0x4f, 0x16, 0x57, 0x15, 0x91, 0x78, 0x4e,
0xab, 0x55, 0x38, 0x2f, 0x3b, 0xd5, 0x42, 0x2d} };
Index: sys/dev/hyperv/utilities/hv_kvp.c
===================================================================
--- sys/dev/hyperv/utilities/hv_kvp.c
+++ sys/dev/hyperv/utilities/hv_kvp.c
@@ -90,7 +90,7 @@
log(LOG_INFO, "hv_kvp: " __VA_ARGS__); \
} while (0)
-static const hv_guid service_guid = { .data =
+static const struct hyperv_guid service_guid = { .hv_guid =
{0xe7, 0xf4, 0xa0, 0xa9, 0x45, 0x5a, 0x96, 0x4d,
0xb8, 0x27, 0x8a, 0x84, 0x1e, 0x8c, 0x3, 0xe6} };
Index: sys/dev/hyperv/utilities/hv_shutdown.c
===================================================================
--- sys/dev/hyperv/utilities/hv_shutdown.c
+++ sys/dev/hyperv/utilities/hv_shutdown.c
@@ -43,7 +43,7 @@
#include "hv_util.h"
#include "vmbus_if.h"
-static const hv_guid service_guid = { .data =
+static const struct hyperv_guid service_guid = { .hv_guid =
{0x31, 0x60, 0x0B, 0X0E, 0x13, 0x52, 0x34, 0x49,
0x81, 0x8B, 0x38, 0XD9, 0x0C, 0xED, 0x39, 0xDB} };
Index: sys/dev/hyperv/utilities/hv_timesync.c
===================================================================
--- sys/dev/hyperv/utilities/hv_timesync.c
+++ sys/dev/hyperv/utilities/hv_timesync.c
@@ -55,7 +55,7 @@
} time_sync_data;
/* Time Synch Service */
-static const hv_guid service_guid = {.data =
+static const struct hyperv_guid service_guid = {.hv_guid =
{0x30, 0xe6, 0x27, 0x95, 0xae, 0xd0, 0x7b, 0x49,
0xad, 0xce, 0xe8, 0x0a, 0xb0, 0x17, 0x5c, 0xaf } };
Index: sys/dev/hyperv/vmbus/hv_channel_mgmt.c
===================================================================
--- sys/dev/hyperv/vmbus/hv_channel_mgmt.c
+++ sys/dev/hyperv/vmbus/hv_channel_mgmt.c
@@ -128,9 +128,9 @@
TAILQ_FOREACH(channel, &sc->vmbus_chlist, ch_link) {
if (memcmp(&channel->ch_guid_type, &new_channel->ch_guid_type,
- sizeof(hv_guid)) == 0 &&
+ sizeof(struct hyperv_guid)) == 0 &&
memcmp(&channel->ch_guid_inst, &new_channel->ch_guid_inst,
- sizeof(hv_guid)) == 0)
+ sizeof(struct hyperv_guid)) == 0)
break;
}
Index: sys/dev/hyperv/vmbus/hv_vmbus_priv.h
===================================================================
--- sys/dev/hyperv/vmbus/hv_vmbus_priv.h
+++ sys/dev/hyperv/vmbus/hv_vmbus_priv.h
@@ -56,8 +56,8 @@
typedef struct {
uint32_t rel_id;
hv_vmbus_channel_state state;
- hv_guid interface_type;
- hv_guid interface_instance;
+ struct hyperv_guid interface_type;
+ struct hyperv_guid interface_instance;
uint32_t monitor_id;
uint32_t server_monitor_pending;
uint32_t server_monitor_latency;
Index: sys/dev/hyperv/vmbus/hyperv.c
===================================================================
--- sys/dev/hyperv/vmbus/hyperv.c
+++ sys/dev/hyperv/vmbus/hyperv.c
@@ -116,9 +116,9 @@
}
int
-hyperv_guid2str(const struct hv_guid *guid, char *buf, size_t sz)
+hyperv_guid2str(const struct hyperv_guid *guid, char *buf, size_t sz)
{
- const uint8_t *d = guid->data;
+ const uint8_t *d = guid->hv_guid;
return snprintf(buf, sz, "%02x%02x%02x%02x-"
"%02x%02x-%02x%02x-%02x%02x-"
Index: sys/dev/hyperv/vmbus/vmbus.c
===================================================================
--- sys/dev/hyperv/vmbus/vmbus.c
+++ sys/dev/hyperv/vmbus/vmbus.c
@@ -1051,11 +1051,12 @@
}
static int
-vmbus_probe_guid_method(device_t bus, device_t dev, const struct hv_guid *guid)
+vmbus_probe_guid_method(device_t bus, device_t dev,
+ const struct hyperv_guid *guid)
{
const struct hv_vmbus_channel *chan = vmbus_get_channel(dev);
- if (memcmp(&chan->ch_guid_type, guid, sizeof(struct hv_guid)) == 0)
+ if (memcmp(&chan->ch_guid_type, guid, sizeof(struct hyperv_guid)) == 0)
return 0;
return ENXIO;
}
Index: sys/dev/hyperv/vmbus/vmbus_if.m
===================================================================
--- sys/dev/hyperv/vmbus/vmbus_if.m
+++ sys/dev/hyperv/vmbus/vmbus_if.m
@@ -32,7 +32,7 @@
INTERFACE vmbus;
HEADER {
- struct hv_guid;
+ struct hyperv_guid;
};
METHOD uint32_t get_version {
@@ -43,5 +43,5 @@
METHOD int probe_guid {
device_t bus;
device_t dev;
- const struct hv_guid *guid;
+ const struct hyperv_guid *guid;
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 23, 6:14 PM (2 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32037824
Default Alt Text
D7092.id18119.diff (7 KB)
Attached To
Mode
D7092: hyperv: hv_guid -> struct hyperv_guid.
Attached
Detach File
Event Timeline
Log In to Comment