diff options
Diffstat (limited to 'drivers/staging/hv/VmbusPrivate.h')
-rw-r--r-- | drivers/staging/hv/VmbusPrivate.h | 83 |
1 files changed, 45 insertions, 38 deletions
diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h index 686d05f21ed..ad17088f601 100644 --- a/drivers/staging/hv/VmbusPrivate.h +++ b/drivers/staging/hv/VmbusPrivate.h @@ -30,26 +30,29 @@ #include "Channel.h" #include "ChannelMgmt.h" #include "ChannelInterface.h" -//#include "ChannelMessages.h" +/* #include "ChannelMessages.h" */ #include "RingBuffer.h" -//#include "Packet.h" +/* #include "Packet.h" */ #include "include/List.h" -// -// Defines -// -// Maximum channels is determined by the size of the interrupt page which is PAGE_SIZE. 1/2 of PAGE_SIZE is for -// send endpoint interrupt and the other is receive endpoint interrupt -#define MAX_NUM_CHANNELS (PAGE_SIZE >> 1) << 3 // 16348 channels +/* Defines */ -// The value here must be in multiple of 32 -// TODO: Need to make this configurable + +/* + * Maximum channels is determined by the size of the interrupt page + * which is PAGE_SIZE. 1/2 of PAGE_SIZE is for send endpoint interrupt + * and the other is receive endpoint interrupt + */ +#define MAX_NUM_CHANNELS (PAGE_SIZE >> 1) << 3 /* 16348 channels */ + +/* The value here must be in multiple of 32 */ +/* TODO: Need to make this configurable */ #define MAX_NUM_CHANNELS_SUPPORTED 256 -// -// Data types -// + +/* Data types */ + typedef enum { Disconnected, @@ -66,23 +69,27 @@ typedef struct _VMBUS_CONNECTION { u32 NextGpadlHandle; - // Represents channel interrupts. Each bit position - // represents a channel. - // When a channel sends an interrupt via VMBUS, it - // finds its bit in the sendInterruptPage, set it and - // calls Hv to generate a port event. The other end - // receives the port event and parse the recvInterruptPage - // to see which bit is set + /* + * Represents channel interrupts. Each bit position represents + * a channel. When a channel sends an interrupt via VMBUS, it + * finds its bit in the sendInterruptPage, set it and calls Hv + * to generate a port event. The other end receives the port + * event and parse the recvInterruptPage to see which bit is + * set + */ void * InterruptPage; void * SendInterruptPage; void * RecvInterruptPage; - // 2 pages - 1st page for parent->child notification and 2nd is child->parent notification + /* + * 2 pages - 1st page for parent->child notification and 2nd + * is child->parent notification + */ void * MonitorPages; LIST_ENTRY ChannelMsgList; spinlock_t channelmsg_lock; - // List of channels + /* List of channels */ LIST_ENTRY ChannelList; spinlock_t channel_lock; @@ -91,25 +98,25 @@ typedef struct _VMBUS_CONNECTION { typedef struct _VMBUS_MSGINFO { - // Bookkeeping stuff + /* Bookkeeping stuff */ LIST_ENTRY MsgListEntry; - // Synchronize the request/response if needed + /* Synchronize the request/response if needed */ HANDLE WaitEvent; - // The message itself + /* The message itself */ unsigned char Msg[0]; } VMBUS_MSGINFO; -// -// Externs -// + +/* Externs */ + extern VMBUS_CONNECTION gVmbusConnection; -// -// General vmbus interface -// + +/* General vmbus interface */ + static DEVICE_OBJECT* VmbusChildDeviceCreate( GUID deviceType, @@ -124,18 +131,18 @@ static void VmbusChildDeviceRemove( DEVICE_OBJECT* Device); -//static void -//VmbusChildDeviceDestroy( -// DEVICE_OBJECT*); +/* static void */ +/* VmbusChildDeviceDestroy( */ +/* DEVICE_OBJECT*); */ static VMBUS_CHANNEL* GetChannelFromRelId( u32 relId ); -// -// Connection interface -// + +/* Connection interface */ + static int VmbusConnect( void @@ -163,4 +170,4 @@ VmbusOnEvents( ); -#endif // _VMBUS_PRIVATE_H_ +#endif /* _VMBUS_PRIVATE_H_ */ |