Author: sephe Date: Tue Jul 12 08:55:08 2016 New Revision: 302637 URL: https://svnweb.freebsd.org/changeset/base/302637
Log: hyperv/vmbus: Remove needed bits MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7002 Modified: head/sys/dev/hyperv/vmbus/hv_connection.c head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h head/sys/dev/hyperv/vmbus/vmbus.c Modified: head/sys/dev/hyperv/vmbus/hv_connection.c ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_connection.c Tue Jul 12 08:47:04 2016 (r302636) +++ head/sys/dev/hyperv/vmbus/hv_connection.c Tue Jul 12 08:55:08 2016 (r302637) @@ -43,47 +43,6 @@ #include <dev/hyperv/vmbus/vmbus_reg.h> #include <dev/hyperv/vmbus/vmbus_var.h> -/* - * Globals - */ -hv_vmbus_connection hv_vmbus_g_connection = - { .connect_state = HV_DISCONNECTED }; - -/** - * Send a connect request on the partition service connection - */ -int -hv_vmbus_connect(struct vmbus_softc *sc) -{ - /** - * Make sure we are not connecting or connected - */ - if (hv_vmbus_g_connection.connect_state != HV_DISCONNECTED) { - return (-1); - } - - /** - * Initialize the vmbus connection - */ - hv_vmbus_g_connection.connect_state = HV_CONNECTING; - - hv_vmbus_g_connection.connect_state = HV_CONNECTED; - - return (0); -} - -/** - * Send a disconnect request on the partition service connection - */ -int -hv_vmbus_disconnect(void) -{ - - hv_vmbus_g_connection.connect_state = HV_DISCONNECTED; - - return (0); -} - static __inline void vmbus_event_flags_proc(struct vmbus_softc *sc, volatile u_long *event_flags, int flag_cnt) Modified: head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h ============================================================================== --- head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Tue Jul 12 08:47:04 2016 (r302636) +++ head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h Tue Jul 12 08:55:08 2016 (r302637) @@ -97,20 +97,6 @@ typedef struct hv_vmbus_channel_packet_m hv_vmbus_multipage_buffer range; } __packed hv_vmbus_channel_packet_multipage_buffer; -/* - * VM Bus connection states - */ -typedef enum { - HV_DISCONNECTED, - HV_CONNECTING, - HV_CONNECTED, - HV_DISCONNECTING -} hv_vmbus_connect_state; - -typedef struct { - hv_vmbus_connect_state connect_state; -} hv_vmbus_connection; - typedef union { uint32_t as_uint32_t; struct { @@ -172,12 +158,6 @@ typedef struct { uint8_t rsvd_z4[1984]; } hv_vmbus_monitor_page; -/** - * Global variables - */ - -extern hv_vmbus_connection hv_vmbus_g_connection; - /* * Private, VM Bus functions */ @@ -242,10 +222,4 @@ void hv_vmbus_child_device_register(st int hv_vmbus_child_device_unregister( struct hv_device *child_dev); -/** - * Connection interfaces - */ -int hv_vmbus_connect(struct vmbus_softc *); -int hv_vmbus_disconnect(void); - #endif /* __HYPERV_PRIV_H__ */ Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Tue Jul 12 08:47:04 2016 (r302636) +++ head/sys/dev/hyperv/vmbus/vmbus.c Tue Jul 12 08:55:08 2016 (r302637) @@ -1169,12 +1169,8 @@ vmbus_doattach(struct vmbus_softc *sc) sc->vmbus_flags |= VMBUS_FLAG_SYNIC; /* - * Connect to VMBus in the root partition + * Initialize vmbus, e.g. connect to Hypervisor. */ - ret = hv_vmbus_connect(sc); - if (ret != 0) - goto cleanup; - ret = vmbus_init(sc); if (ret != 0) goto cleanup; @@ -1271,7 +1267,6 @@ vmbus_detach(device_t dev) hv_vmbus_release_unattached_channels(sc); vmbus_disconnect(sc); - hv_vmbus_disconnect(); if (sc->vmbus_flags & VMBUS_FLAG_SYNIC) { sc->vmbus_flags &= ~VMBUS_FLAG_SYNIC; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"