]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/staging/hv/netvsc.h
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / staging / hv / netvsc.h
index c71dce5b3f7c958168d880e0e922a29d64803217..932a77ccdc04d935ba613f57778895904b060707 100644 (file)
 #define NVSP_MAX_PROTOCOL_VERSION      NVSP_PROTOCOL_VERSION_1
 
 enum {
-       NvspMessageTypeNone = 0,
+       NVSP_MSG_TYPE_NONE = 0,
 
        /* Init Messages */
-       NvspMessageTypeInit                     = 1,
-       NvspMessageTypeInitComplete             = 2,
+       NVSP_MSG_TYPE_INIT                      = 1,
+       NVSP_MSG_TYPE_INIT_COMPLETE             = 2,
 
-       NvspVersionMessageStart                 = 100,
+       NVSP_VERSION_MSG_START                  = 100,
 
        /* Version 1 Messages */
-       NvspMessage1TypeSendNdisVersion         = NvspVersionMessageStart,
+       NVSP_MSG1_TYPE_SEND_NDIS_VER            = NVSP_VERSION_MSG_START,
 
-       NvspMessage1TypeSendReceiveBuffer,
-       NvspMessage1TypeSendReceiveBufferComplete,
-       NvspMessage1TypeRevokeReceiveBuffer,
+       NVSP_MSG1_TYPE_SEND_RECV_BUF,
+       NVSP_MSG1_TYPE_SEND_RECV_BUF_COMPLETE,
+       NVSP_MSG1_TYPE_REVOKE_RECV_BUF,
 
-       NvspMessage1TypeSendSendBuffer,
-       NvspMessage1TypeSendSendBufferComplete,
-       NvspMessage1TypeRevokeSendBuffer,
+       NVSP_MSG1_TYPE_SEND_SEND_BUF,
+       NVSP_MSG1_TYPE_SEND_SEND_BUF_COMPLETE,
+       NVSP_MSG1_TYPE_REVOKE_SEND_BUF,
 
-       NvspMessage1TypeSendRNDISPacket,
-       NvspMessage1TypeSendRNDISPacketComplete,
+       NVSP_MSG1_TYPE_SEND_RNDIS_PKT,
+       NVSP_MSG1_TYPE_SEND_RNDIS_PKT_COMPLETE,
 
        /*
         * This should be set to the number of messages for the version with
         * the maximum number of messages.
         */
-       NvspNumMessagePerVersion                = 9,
+       NVSP_NUM_MSG_PER_VERSION                = 9,
 };
 
 enum {
-       NvspStatusNone = 0,
-       NvspStatusSuccess,
-       NvspStatusFailure,
-       NvspStatusProtocolVersionRangeTooNew,
-       NvspStatusProtocolVersionRangeTooOld,
-       NvspStatusInvalidRndisPacket,
-       NvspStatusBusy,
-       NvspStatusMax,
+       NVSP_STAT_NONE = 0,
+       NVSP_STAT_SUCCESS,
+       NVSP_STAT_FAIL,
+       NVSP_STAT_PROTOCOL_TOO_NEW,
+       NVSP_STAT_PROTOCOL_TOO_OLD,
+       NVSP_STAT_INVALID_RNDIS_PKT,
+       NVSP_STAT_BUSY,
+       NVSP_STAT_MAX,
 };
 
 struct nvsp_message_header {
-       u32 MessageType;
+       u32 msg_type;
 };
 
 /* Init Messages */
@@ -90,8 +90,8 @@ struct nvsp_message_header {
  * versioning (i.e. this message will be the same for ever).
  */
 struct nvsp_message_init {
-       u32 MinProtocolVersion;
-       u32 MaxProtocolVersion;
+       u32 min_protocol_ver;
+       u32 max_protocol_ver;
 } __attribute__((packed));
 
 /*
@@ -100,14 +100,14 @@ struct nvsp_message_init {
  * (i.e. this message will be the same for ever).
  */
 struct nvsp_message_init_complete {
-       u32 NegotiatedProtocolVersion;
-       u32 MaximumMdlChainLength;
-       u32 Status;
+       u32 negotiated_protocol_ver;
+       u32 max_mdl_chain_len;
+       u32 status;
 } __attribute__((packed));
 
 union nvsp_message_init_uber {
-       struct nvsp_message_init Init;
-       struct nvsp_message_init_complete InitComplete;
+       struct nvsp_message_init init;
+       struct nvsp_message_init_complete init_complete;
 } __attribute__((packed));
 
 /* Version 1 Messages */
@@ -117,8 +117,8 @@ union nvsp_message_init_uber {
  * can use this information when handling OIDs sent by the VSC.
  */
 struct nvsp_1_message_send_ndis_version {
-       u32 NdisMajorVersion;
-       u32 NdisMinorVersion;
+       u32 ndis_major_ver;
+       u32 ndis_minor_ver;
 } __attribute__((packed));
 
 /*
@@ -126,15 +126,15 @@ struct nvsp_1_message_send_ndis_version {
  * can then use the receive buffer to send data to the VSC.
  */
 struct nvsp_1_message_send_receive_buffer {
-       u32 GpadlHandle;
-       u16 Id;
+       u32 gpadl_handle;
+       u16 id;
 } __attribute__((packed));
 
 struct nvsp_1_receive_buffer_section {
-       u32 Offset;
-       u32 SubAllocationSize;
-       u32 NumSubAllocations;
-       u32 EndOffset;
+       u32 offset;
+       u32 sub_alloc_size;
+       u32 num_sub_allocs;
+       u32 end_offset;
 } __attribute__((packed));
 
 /*
@@ -143,8 +143,8 @@ struct nvsp_1_receive_buffer_section {
  * buffer.
  */
 struct nvsp_1_message_send_receive_buffer_complete {
-       u32 Status;
-       u32 NumSections;
+       u32 status;
+       u32 num_sections;
 
        /*
         * The receive buffer is split into two parts, a large suballocation
@@ -165,7 +165,7 @@ struct nvsp_1_message_send_receive_buffer_complete {
         *  LargeOffset                            SmallOffset
         */
 
-       struct nvsp_1_receive_buffer_section Sections[1];
+       struct nvsp_1_receive_buffer_section sections[1];
 } __attribute__((packed));
 
 /*
@@ -174,7 +174,7 @@ struct nvsp_1_message_send_receive_buffer_complete {
  * again.
  */
 struct nvsp_1_message_revoke_receive_buffer {
-       u16 Id;
+       u16 id;
 };
 
 /*
@@ -182,8 +182,8 @@ struct nvsp_1_message_revoke_receive_buffer {
  * can then use the send buffer to send data to the VSP.
  */
 struct nvsp_1_message_send_send_buffer {
-       u32 GpadlHandle;
-       u16 Id;
+       u32 gpadl_handle;
+       u16 id;
 } __attribute__((packed));
 
 /*
@@ -192,7 +192,7 @@ struct nvsp_1_message_send_send_buffer {
  * buffer.
  */
 struct nvsp_1_message_send_send_buffer_complete {
-       u32 Status;
+       u32 status;
 
        /*
         * The VSC gets to choose the size of the send buffer and the VSP gets
@@ -200,7 +200,7 @@ struct nvsp_1_message_send_send_buffer_complete {
         * dynamic reconfigurations when the cost of GPA-direct buffers
         * decreases.
         */
-       u32 SectionSize;
+       u32 section_size;
 } __attribute__((packed));
 
 /*
@@ -208,7 +208,7 @@ struct nvsp_1_message_send_send_buffer_complete {
  * completes this transaction, the vsp should never use the send buffer again.
  */
 struct nvsp_1_message_revoke_send_buffer {
-       u16 Id;
+       u16 id;
 };
 
 /*
@@ -221,7 +221,7 @@ struct nvsp_1_message_send_rndis_packet {
         * channels of communication. However, the Network VSP only has one.
         * Therefore, the channel travels with the RNDIS packet.
         */
-       u32 ChannelType;
+       u32 channel_type;
 
        /*
         * This field is used to send part or all of the data through a send
@@ -229,8 +229,8 @@ struct nvsp_1_message_send_rndis_packet {
         * index is 0xFFFFFFFF, then the send buffer is not being used and all
         * of the data was sent through other VMBus mechanisms.
         */
-       u32 SendBufferSectionIndex;
-       u32 SendBufferSectionSize;
+       u32 send_buf_section_index;
+       u32 send_buf_section_size;
 } __attribute__((packed));
 
 /*
@@ -239,35 +239,35 @@ struct nvsp_1_message_send_rndis_packet {
  * message cannot use any resources associated with the original RNDIS packet.
  */
 struct nvsp_1_message_send_rndis_packet_complete {
-       u32 Status;
+       u32 status;
 };
 
 union nvsp_1_message_uber {
-       struct nvsp_1_message_send_ndis_version SendNdisVersion;
+       struct nvsp_1_message_send_ndis_version send_ndis_ver;
 
-       struct nvsp_1_message_send_receive_buffer SendReceiveBuffer;
+       struct nvsp_1_message_send_receive_buffer send_recv_buf;
        struct nvsp_1_message_send_receive_buffer_complete
-                                               SendReceiveBufferComplete;
-       struct nvsp_1_message_revoke_receive_buffer RevokeReceiveBuffer;
+                                               send_recv_buf_complete;
+       struct nvsp_1_message_revoke_receive_buffer revoke_recv_buf;
 
-       struct nvsp_1_message_send_send_buffer SendSendBuffer;
-       struct nvsp_1_message_send_send_buffer_complete SendSendBufferComplete;
-       struct nvsp_1_message_revoke_send_buffer RevokeSendBuffer;
+       struct nvsp_1_message_send_send_buffer send_send_buf;
+       struct nvsp_1_message_send_send_buffer_complete send_send_buf_complete;
+       struct nvsp_1_message_revoke_send_buffer revoke_send_buf;
 
-       struct nvsp_1_message_send_rndis_packet SendRNDISPacket;
+       struct nvsp_1_message_send_rndis_packet send_rndis_pkt;
        struct nvsp_1_message_send_rndis_packet_complete
-                                               SendRNDISPacketComplete;
+                                               send_rndis_pkt_complete;
 } __attribute__((packed));
 
 union nvsp_all_messages {
-       union nvsp_message_init_uber InitMessages;
-       union nvsp_1_message_uber Version1Messages;
+       union nvsp_message_init_uber init_msg;
+       union nvsp_1_message_uber v1_msg;
 } __attribute__((packed));
 
 /* ALL Messages */
 struct nvsp_message {
-       struct nvsp_message_header Header;
-       union nvsp_all_messages Messages;
+       struct nvsp_message_header hdr;
+       union nvsp_all_messages msg;
 } __attribute__((packed));
 
 
@@ -293,39 +293,39 @@ struct nvsp_message {
 
 /* Per netvsc channel-specific */
 struct netvsc_device {
-       struct hv_device *Device;
+       struct hv_device *dev;
 
-       atomic_t RefCount;
-       atomic_t NumOutstandingSends;
+       atomic_t refcnt;
+       atomic_t num_outstanding_sends;
        /*
         * List of free preallocated hv_netvsc_packet to represent receive
         * packet
         */
-       struct list_head ReceivePacketList;
-       spinlock_t receive_packet_list_lock;
+       struct list_head recv_pkt_list;
+       spinlock_t recv_pkt_list_lock;
 
        /* Send buffer allocated by us but manages by NetVSP */
-       void *SendBuffer;
-       u32 SendBufferSize;
-       u32 SendBufferGpadlHandle;
-       u32 SendSectionSize;
+       void *send_buf;
+       u32 send_buf_size;
+       u32 send_buf_gpadl_handle;
+       u32 send_section_size;
 
        /* Receive buffer allocated by us but manages by NetVSP */
-       void *ReceiveBuffer;
-       u32 ReceiveBufferSize;
-       u32 ReceiveBufferGpadlHandle;
-       u32 ReceiveSectionCount;
-       struct nvsp_1_receive_buffer_section *ReceiveSections;
+       void *recv_buf;
+       u32 recv_buf_size;
+       u32 recv_buf_gpadl_handle;
+       u32 recv_section_cnt;
+       struct nvsp_1_receive_buffer_section *recv_section;
 
        /* Used for NetVSP initialization protocol */
-       struct osd_waitevent *ChannelInitEvent;
-       struct nvsp_message ChannelInitPacket;
+       struct osd_waitevent *channel_init_event;
+       struct nvsp_message channel_init_pkt;
 
-       struct nvsp_message RevokePacket;
+       struct nvsp_message revoke_packet;
        /* unsigned char HwMacAddr[HW_MACADDR_LEN]; */
 
        /* Holds rndis device info */
-       void *Extension;
+       void *extension;
 };
 
 #endif /* _NETVSC_H_ */