Author: sephe Date: Wed Jul 13 05:19:45 2016 New Revision: 302700 URL: https://svnweb.freebsd.org/changeset/base/302700
Log: hyperv/vmbus: Add channel ivar accessor. This makes life easier during the transition period to nuke the hv_device. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7026 Modified: head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/vmbus/vmbus.c Modified: head/sys/dev/hyperv/include/hyperv.h ============================================================================== --- head/sys/dev/hyperv/include/hyperv.h Wed Jul 13 05:11:45 2016 (r302699) +++ head/sys/dev/hyperv/include/hyperv.h Wed Jul 13 05:19:45 2016 (r302700) @@ -403,14 +403,18 @@ enum { HV_VMBUS_IVAR_TYPE, HV_VMBUS_IVAR_INSTANCE, HV_VMBUS_IVAR_NODE, - HV_VMBUS_IVAR_DEVCTX + HV_VMBUS_IVAR_DEVCTX, + HV_VMBUS_IVAR_CHAN, }; #define HV_VMBUS_ACCESSOR(var, ivar, type) \ __BUS_ACCESSOR(vmbus, var, HV_VMBUS, ivar, type) +struct hv_vmbus_channel; + HV_VMBUS_ACCESSOR(type, TYPE, const char *) HV_VMBUS_ACCESSOR(devctx, DEVCTX, struct hv_device *) +HV_VMBUS_ACCESSOR(channel, CHAN, struct hv_vmbus_channel *) /* Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Wed Jul 13 05:11:45 2016 (r302699) +++ head/sys/dev/hyperv/vmbus/vmbus.c Wed Jul 13 05:19:45 2016 (r302700) @@ -978,6 +978,10 @@ vmbus_read_ivar(device_t dev, device_t c case HV_VMBUS_IVAR_NODE: *result = (uintptr_t)child_dev_ctx->device; return (0); + + case HV_VMBUS_IVAR_CHAN: + *result = (uintptr_t)child_dev_ctx->channel; + return (0); } return (ENOENT); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"