Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/hv_channel.c
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | vmbus_channel_sysctl_create(hv_vmbus_channel* channel) | ||||
struct sysctl_ctx_list *ctx; | struct sysctl_ctx_list *ctx; | ||||
uint32_t ch_id; | uint32_t ch_id; | ||||
uint16_t sub_ch_id; | uint16_t sub_ch_id; | ||||
char name[16]; | char name[16]; | ||||
hv_vmbus_channel* primary_ch = channel->primary_channel; | hv_vmbus_channel* primary_ch = channel->primary_channel; | ||||
if (primary_ch == NULL) { | if (primary_ch == NULL) { | ||||
dev = channel->device->device; | dev = channel->ch_dev; | ||||
ch_id = channel->ch_id; | ch_id = channel->ch_id; | ||||
} else { | } else { | ||||
dev = primary_ch->device->device; | dev = primary_ch->ch_dev; | ||||
ch_id = primary_ch->ch_id; | ch_id = primary_ch->ch_id; | ||||
sub_ch_id = channel->ch_subidx; | sub_ch_id = channel->ch_subidx; | ||||
} | } | ||||
ctx = &channel->ch_sysctl_ctx; | ctx = &channel->ch_sysctl_ctx; | ||||
sysctl_ctx_init(ctx); | sysctl_ctx_init(ctx); | ||||
/* This creates dev.DEVNAME.DEVUNIT.channel tree */ | /* This creates dev.DEVNAME.DEVUNIT.channel tree */ | ||||
devch_sysctl = SYSCTL_ADD_NODE(ctx, | devch_sysctl = SYSCTL_ADD_NODE(ctx, | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | ||||
▲ Show 20 Lines • Show All 859 Lines • Show Last 20 Lines |