Page MenuHomeFreeBSD

D7020.id.diff
No OneTemporary

D7020.id.diff

Index: head/sys/dev/hyperv/include/hyperv.h
===================================================================
--- head/sys/dev/hyperv/include/hyperv.h
+++ head/sys/dev/hyperv/include/hyperv.h
@@ -632,6 +632,9 @@
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 sysctl_ctx_list ch_sysctl_ctx;
} hv_vmbus_channel;
Index: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
+++ head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
@@ -127,11 +127,9 @@
}
TAILQ_FOREACH(channel, &sc->vmbus_chlist, ch_link) {
- if (memcmp(&channel->offer_msg.offer.interface_type,
- &new_channel->offer_msg.offer.interface_type,
+ if (memcmp(&channel->ch_guid_type, &new_channel->ch_guid_type,
sizeof(hv_guid)) == 0 &&
- memcmp(&channel->offer_msg.offer.interface_instance,
- &new_channel->offer_msg.offer.interface_instance,
+ memcmp(&channel->ch_guid_inst, &new_channel->ch_guid_inst,
sizeof(hv_guid)) == 0)
break;
}
@@ -212,9 +210,7 @@
* (We need to set the device field before calling
* hv_vmbus_child_device_add())
*/
- new_channel->device = hv_vmbus_child_device_create(
- new_channel->offer_msg.offer.interface_type,
- new_channel->offer_msg.offer.interface_instance, new_channel);
+ new_channel->device = hv_vmbus_child_device_create(new_channel);
/*
* Add the new device to the bus. This will kick off device-driver
@@ -296,6 +292,8 @@
new_channel->ch_subidx = offer->offer.sub_channel_index;
if (offer->monitor_allocated)
new_channel->ch_flags |= VMBUS_CHAN_FLAG_HASMNF;
+ new_channel->ch_guid_type = offer->offer.interface_type;
+ new_channel->ch_guid_inst = offer->offer.interface_instance;
/*
* By default we setup state to enable batched
Index: head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
+++ head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
@@ -213,9 +213,7 @@
struct vmbus_softc *);
struct hv_device* hv_vmbus_child_device_create(
- hv_guid device_type,
- hv_guid device_instance,
- hv_vmbus_channel *channel);
+ struct hv_vmbus_channel *channel);
void hv_vmbus_child_device_register(struct vmbus_softc *,
struct hv_device *child_dev);
Index: head/sys/dev/hyperv/vmbus/vmbus.c
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus.c
+++ head/sys/dev/hyperv/vmbus/vmbus.c
@@ -1017,8 +1017,7 @@
}
struct hv_device *
-hv_vmbus_child_device_create(hv_guid type, hv_guid instance,
- hv_vmbus_channel *channel)
+hv_vmbus_child_device_create(struct hv_vmbus_channel *channel)
{
hv_device *child_dev;
@@ -1028,8 +1027,8 @@
child_dev = malloc(sizeof(hv_device), M_DEVBUF, M_WAITOK | M_ZERO);
child_dev->channel = channel;
- memcpy(&child_dev->class_id, &type, sizeof(hv_guid));
- memcpy(&child_dev->device_id, &instance, sizeof(hv_guid));
+ child_dev->class_id = channel->ch_guid_type;
+ child_dev->device_id = channel->ch_guid_inst;
return (child_dev);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 23, 12:09 PM (5 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25919690
Default Alt Text
D7020.id.diff (3 KB)

Event Timeline