Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2016 05:19:46 +0000 (UTC)
From:      Sepherosa Ziehau <sephe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r302700 - in head/sys/dev/hyperv: include vmbus
Message-ID:  <201607130519.u6D5JkO8093249@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607130519.u6D5JkO8093249>