Page MenuHomeFreeBSD

D7002.diff
No OneTemporary

D7002.diff

Index: head/sys/dev/hyperv/vmbus/hv_connection.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_connection.c
+++ head/sys/dev/hyperv/vmbus/hv_connection.c
@@ -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)
Index: head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
+++ head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h
@@ -97,20 +97,6 @@
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 @@
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 @@
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__ */
Index: head/sys/dev/hyperv/vmbus/vmbus.c
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus.c
+++ head/sys/dev/hyperv/vmbus/vmbus.c
@@ -1169,12 +1169,8 @@
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 @@
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;

File Metadata

Mime Type
text/plain
Expires
Wed, Mar 4, 5:32 PM (21 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29251598
Default Alt Text
D7002.diff (2 KB)

Event Timeline