summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv/include/hyperv.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/hyperv/include/hyperv.h')
-rw-r--r--sys/dev/hyperv/include/hyperv.h31
1 files changed, 7 insertions, 24 deletions
diff --git a/sys/dev/hyperv/include/hyperv.h b/sys/dev/hyperv/include/hyperv.h
index 2ebc608..41d9f59 100644
--- a/sys/dev/hyperv/include/hyperv.h
+++ b/sys/dev/hyperv/include/hyperv.h
@@ -399,20 +399,6 @@ typedef struct {
#define HW_MACADDR_LEN 6
-enum {
- HV_VMBUS_IVAR_TYPE,
- HV_VMBUS_IVAR_INSTANCE,
- HV_VMBUS_IVAR_NODE,
- HV_VMBUS_IVAR_DEVCTX
-};
-
-#define HV_VMBUS_ACCESSOR(var, ivar, type) \
- __BUS_ACCESSOR(vmbus, var, HV_VMBUS, ivar, type)
-
-HV_VMBUS_ACCESSOR(type, TYPE, const char *)
-HV_VMBUS_ACCESSOR(devctx, DEVCTX, struct hv_device *)
-
-
/*
* Common defines for Hyper-V ICs
*/
@@ -534,7 +520,7 @@ typedef union {
} __packed hv_vmbus_connection_id;
typedef struct hv_vmbus_channel {
- struct hv_device* device;
+ device_t ch_dev;
struct vmbus_softc *vmbus_sc;
hv_vmbus_channel_state state;
uint32_t ch_flags; /* VMBUS_CHAN_FLAG_ */
@@ -647,15 +633,6 @@ hv_set_channel_read_state(hv_vmbus_channel* channel, boolean_t state)
channel->batched_reading = state;
}
-typedef struct hv_device {
- hv_guid class_id;
- hv_guid device_id;
- device_t device;
- hv_vmbus_channel* channel;
-} hv_device;
-
-
-
int hv_vmbus_channel_recv_packet(
hv_vmbus_channel* channel,
void* buffer,
@@ -737,4 +714,10 @@ hv_get_phys_addr(void *virt)
return (ret);
}
+static __inline struct hv_vmbus_channel *
+vmbus_get_channel(device_t dev)
+{
+ return device_get_ivars(dev);
+}
+
#endif /* __HYPERV_H__ */
OpenPOWER on IntegriCloud