Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168001047
D7108.id18413.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7108.id18413.diff
View Options
Index: head/sys/dev/hyperv/include/hyperv.h
===================================================================
--- head/sys/dev/hyperv/include/hyperv.h
+++ head/sys/dev/hyperv/include/hyperv.h
@@ -336,7 +336,7 @@
struct sysctl_ctx_list ch_sysctl_ctx;
} hv_vmbus_channel;
-#define HV_VMBUS_CHAN_ISPRIMARY(chan) ((chan)->primary_channel == NULL)
+#define VMBUS_CHAN_ISPRIMARY(chan) ((chan)->ch_subidx == 0)
#define VMBUS_CHAN_FLAG_HASMNF 0x0001
/*
Index: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
===================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -2957,7 +2957,7 @@
hn_subchan_attach(struct hn_softc *sc, struct hv_vmbus_channel *chan)
{
- KASSERT(!HV_VMBUS_CHAN_ISPRIMARY(chan),
+ KASSERT(!VMBUS_CHAN_ISPRIMARY(chan),
("subchannel callback on primary channel"));
KASSERT(chan->ch_subidx > 0,
("invalid channel subidx %u",
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
@@ -285,7 +285,7 @@
return;
}
- if (HV_VMBUS_CHAN_ISPRIMARY(chan)) {
+ if (VMBUS_CHAN_ISPRIMARY(chan)) {
/*
* Add device for this primary channel.
*
@@ -332,7 +332,7 @@
{
struct hv_vmbus_channel *chan = xchan;
- if (HV_VMBUS_CHAN_ISPRIMARY(chan)) {
+ if (VMBUS_CHAN_ISPRIMARY(chan)) {
/* Only primary channel owns the device */
hv_vmbus_child_device_unregister(chan);
/* NOTE: DO NOT free primary channel for now */
@@ -413,7 +413,7 @@
channel = TAILQ_FIRST(&sc->vmbus_chlist);
TAILQ_REMOVE(&sc->vmbus_chlist, channel, ch_link);
- if (HV_VMBUS_CHAN_ISPRIMARY(channel)) {
+ if (VMBUS_CHAN_ISPRIMARY(channel)) {
/* Only primary channel owns the device */
hv_vmbus_child_device_unregister(channel);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 26, 8:45 PM (5 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37266148
Default Alt Text
D7108.id18413.diff (1 KB)
Attached To
Mode
D7108: hyperv/vmbus: Use sub-channel index to detect primary channel
Attached
Detach File
Event Timeline
Log In to Comment