Staging: hv: remove ReadMsr and WriteMsr functions from Hv.h
[safe/jmp/linux-2.6] / drivers / staging / hv / ChannelMgmt.h
index 06308a4..ea901dc 100644 (file)
@@ -45,29 +45,29 @@ typedef enum {
 typedef struct _VMBUS_CHANNEL {
        LIST_ENTRY                                      ListEntry;
 
-       DEVICE_OBJECT*                          DeviceObject;
+       struct hv_device *DeviceObject;
 
-       HANDLE                                          PollTimer; // SA-111 workaround
+       struct timer_list poll_timer; /* SA-111 workaround */
 
        VMBUS_CHANNEL_STATE                     State;
 
        VMBUS_CHANNEL_OFFER_CHANNEL OfferMsg;
-       // These are based on the OfferMsg.MonitorId. Save it here for easy access.
+       /* These are based on the OfferMsg.MonitorId. Save it here for easy access. */
        u8                                              MonitorGroup;
        u8                                              MonitorBit;
 
-       UINT32                                          RingBufferGpadlHandle;
+       u32                                             RingBufferGpadlHandle;
 
-       // Allocated memory for ring buffer
+       /* Allocated memory for ring buffer */
        void *                                          RingBufferPages;
-       UINT32                                          RingBufferPageCount;
-       RING_BUFFER_INFO                        Outbound;       // send to parent
-       RING_BUFFER_INFO                        Inbound;        // receive from parent
-       HANDLE                                          InboundLock;
-       HANDLE                                          ControlWQ;
+       u32                                             RingBufferPageCount;
+       RING_BUFFER_INFO                        Outbound;       /* send to parent */
+       RING_BUFFER_INFO                        Inbound;        /* receive from parent */
+       spinlock_t inbound_lock;
+       struct workqueue_struct *ControlWQ;
 
-       // Channel callback are invoked in this workqueue context
-       //HANDLE                                                dataWorkQueue;
+       /* Channel callback are invoked in this workqueue context */
+       /* HANDLE                                               dataWorkQueue; */
 
        PFN_CHANNEL_CALLBACK            OnChannelCallback;
        void *                                          ChannelCallbackContext;
@@ -76,17 +76,17 @@ typedef struct _VMBUS_CHANNEL {
 
 
 typedef struct _VMBUS_CHANNEL_DEBUG_INFO {
-       UINT32                                          RelId;
+       u32                                             RelId;
        VMBUS_CHANNEL_STATE                     State;
        GUID                                            InterfaceType;
     GUID                                               InterfaceInstance;
-       UINT32                                          MonitorId;
-       UINT32                                          ServerMonitorPending;
-       UINT32                                          ServerMonitorLatency;
-       UINT32                                          ServerMonitorConnectionId;
-       UINT32                                          ClientMonitorPending;
-       UINT32                                          ClientMonitorLatency;
-       UINT32                                          ClientMonitorConnectionId;
+       u32                                             MonitorId;
+       u32                                             ServerMonitorPending;
+       u32                                             ServerMonitorLatency;
+       u32                                             ServerMonitorConnectionId;
+       u32                                             ClientMonitorPending;
+       u32                                             ClientMonitorLatency;
+       u32                                             ClientMonitorConnectionId;
 
        RING_BUFFER_DEBUG_INFO          Inbound;
        RING_BUFFER_DEBUG_INFO          Outbound;
@@ -102,31 +102,31 @@ typedef union {
 } VMBUS_CHANNEL_MESSAGE_RESPONSE;
 
 
-// Represents each channel msg on the vmbus connection
-// This is a variable-size data structure depending on
-// the msg type itself
+/*
+ * Represents each channel msg on the vmbus connection This is a
+ * variable-size data structure depending on the msg type itself
+ */
+
 typedef struct _VMBUS_CHANNEL_MSGINFO {
-       // Bookkeeping stuff
+       /* Bookkeeping stuff */
        LIST_ENTRY              MsgListEntry;
 
-       // So far, this is only used to handle gpadl body message
+       /* So far, this is only used to handle gpadl body message */
        LIST_ENTRY              SubMsgList;
 
-       // Synchronize the request/response if needed
-       HANDLE                  WaitEvent;
+       /* Synchronize the request/response if needed */
+       struct osd_waitevent *WaitEvent;
 
        VMBUS_CHANNEL_MESSAGE_RESPONSE Response;
 
-       UINT32                  MessageSize;
-       // The channel message that goes out on the "wire".
-       // It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header
+       u32                     MessageSize;
+       /* The channel message that goes out on the "wire". */
+       /* It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header */
        unsigned char   Msg[0];
 } VMBUS_CHANNEL_MSGINFO;
 
 
-//
-// Routines
-//
+/* Routines */
 
 static VMBUS_CHANNEL*
 AllocVmbusChannel(
@@ -153,4 +153,4 @@ VmbusChannelReleaseUnattachedChannels(
        void
        );
 
-#endif //_CHANNEL_MGMT_H_
+#endif /* _CHANNEL_MGMT_H_ */