diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index 17c505de6f608a078a9ff238cbfceaa2492f0251..3c375cedca77b8b05221adc02c1f44fcfda21ba6 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c @@ -33,9 +33,9 @@ static int VmbusChannelCreateGpadlHeader( void * Kbuffer, // must be phys and virt contiguous - UINT32 Size, // page-size multiple + u32 Size, // page-size multiple VMBUS_CHANNEL_MSGINFO **msgInfo, - UINT32 *MessageCount + u32 *MessageCount ); static void @@ -77,7 +77,7 @@ DumpMonitorPage( { for (j=0; j<32; j++) { - DPRINT_DBG(VMBUS, "param-conn id (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].ConnectionId.AsUINT32); + DPRINT_DBG(VMBUS, "param-conn id (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].ConnectionId.Asu32); DPRINT_DBG(VMBUS, "param-flag (%d)(%d) - %d", i, j, MonitorPage->Parameter[i][j].FlagNumber); } @@ -105,13 +105,13 @@ VmbusChannelSetEvent( if (Channel->OfferMsg.MonitorAllocated) { - // Each UINT32 represents 32 channels - BitSet((UINT32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31); + // Each u32 represents 32 channels + BitSet((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31); monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages; monitorPage++; // Get the child to parent monitor page - BitSet((UINT32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit); + BitSet((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit); } else { @@ -133,13 +133,13 @@ VmbusChannelClearEvent( if (Channel->OfferMsg.MonitorAllocated) { - // Each UINT32 represents 32 channels - BitClear((UINT32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31); + // Each u32 represents 32 channels + BitClear((u32*)gVmbusConnection.SendInterruptPage + (Channel->OfferMsg.ChildRelId >> 5), Channel->OfferMsg.ChildRelId & 31); monitorPage = (HV_MONITOR_PAGE*)gVmbusConnection.MonitorPages; monitorPage++; // Get the child to parent monitor page - BitClear((UINT32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit); + BitClear((u32*) &monitorPage->TriggerGroup[Channel->MonitorGroup].Pending, Channel->MonitorBit); } DPRINT_EXIT(VMBUS); @@ -164,7 +164,7 @@ VmbusChannelGetDebugInfo( HV_MONITOR_PAGE *monitorPage; u8 monitorGroup = (u8)Channel->OfferMsg.MonitorId / 32; u8 monitorOffset = (u8)Channel->OfferMsg.MonitorId % 32; - //UINT32 monitorBit = 1 << monitorOffset; + //u32 monitorBit = 1 << monitorOffset; DebugInfo->RelId = Channel->OfferMsg.ChildRelId; DebugInfo->State = Channel->State; @@ -202,10 +202,10 @@ VmbusChannelGetDebugInfo( int VmbusChannelOpen( VMBUS_CHANNEL *NewChannel, - UINT32 SendRingBufferSize, - UINT32 RecvRingBufferSize, + u32 SendRingBufferSize, + u32 RecvRingBufferSize, void * UserData, - UINT32 UserDataLen, + u32 UserDataLen, PFN_CHANNEL_CALLBACK pfnOnChannelCallback, void * Context ) @@ -330,7 +330,7 @@ VmbusChannelOpen( --*/ static void DumpGpadlBody( VMBUS_CHANNEL_GPADL_BODY *Gpadl, - UINT32 Len) + u32 Len) { int i=0; int pfnCount=0; @@ -393,9 +393,9 @@ static void DumpGpadlHeader( static int VmbusChannelCreateGpadlHeader( void * Kbuffer, // from kmalloc() - UINT32 Size, // page-size multiple + u32 Size, // page-size multiple VMBUS_CHANNEL_MSGINFO **MsgInfo, - UINT32 *MessageCount) + u32 *MessageCount) { int i; int pageCount; @@ -404,7 +404,7 @@ VmbusChannelCreateGpadlHeader( VMBUS_CHANNEL_GPADL_BODY* gpadlBody; VMBUS_CHANNEL_MSGINFO* msgHeader; VMBUS_CHANNEL_MSGINFO* msgBody; - UINT32 msgSize; + u32 msgSize; int pfnSum, pfnCount, pfnLeft, pfnCurr, pfnSize; @@ -465,7 +465,7 @@ VmbusChannelCreateGpadlHeader( (*MessageCount)++; gpadlBody = (VMBUS_CHANNEL_GPADL_BODY*)msgBody->Msg; - // FIXME: Gpadl is UINT32 and we are using a pointer which could be 64-bit + // FIXME: Gpadl is u32 and we are using a pointer which could be 64-bit //gpadlBody->Gpadl = kbuffer; for (i=0; iOffset, MultiPageBuffer->Length); + u32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset, MultiPageBuffer->Length); DPRINT_ENTER(VMBUS); @@ -985,14 +985,14 @@ int VmbusChannelRecvPacket( VMBUS_CHANNEL *Channel, void * Buffer, - UINT32 BufferLen, - UINT32* BufferActualLen, + u32 BufferLen, + u32* BufferActualLen, UINT64* RequestId ) { VMPACKET_DESCRIPTOR desc; - UINT32 packetLen; - UINT32 userLen; + u32 packetLen; + u32 userLen; int ret; DPRINT_ENTER(VMBUS); @@ -1062,14 +1062,14 @@ int VmbusChannelRecvPacketRaw( VMBUS_CHANNEL *Channel, void * Buffer, - UINT32 BufferLen, - UINT32* BufferActualLen, + u32 BufferLen, + u32* BufferActualLen, UINT64* RequestId ) { VMPACKET_DESCRIPTOR desc; - UINT32 packetLen; - UINT32 userLen; + u32 packetLen; + u32 userLen; int ret; DPRINT_ENTER(VMBUS); diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h index 1461f49162cf901d56911a736c35b06fe14bb948..fb17d0c0a7a6f1522c782ab4941587ef5f6dd17d 100644 --- a/drivers/staging/hv/Channel.h +++ b/drivers/staging/hv/Channel.h @@ -38,8 +38,8 @@ typedef struct _VMBUS_CHANNEL_PACKET_PAGE_BUFFER { u16 Length8; u16 Flags; UINT64 TransactionId; - UINT32 Reserved; - UINT32 RangeCount; + u32 Reserved; + u32 RangeCount; PAGE_BUFFER Range[MAX_PAGE_BUFFER_COUNT]; } VMBUS_CHANNEL_PACKET_PAGE_BUFFER; @@ -51,8 +51,8 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER { u16 Length8; u16 Flags; UINT64 TransactionId; - UINT32 Reserved; - UINT32 RangeCount; // Always 1 in this case + u32 Reserved; + u32 RangeCount; // Always 1 in this case MULTIPAGE_BUFFER Range; } VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER; @@ -65,10 +65,10 @@ typedef struct _VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER { static int VmbusChannelOpen( VMBUS_CHANNEL *Channel, - UINT32 SendRingBufferSize, - UINT32 RecvRingBufferSize, + u32 SendRingBufferSize, + u32 RecvRingBufferSize, void * UserData, - UINT32 UserDataLen, + u32 UserDataLen, PFN_CHANNEL_CALLBACK pfnOnChannelCallback, void * Context ); @@ -82,19 +82,19 @@ static int VmbusChannelSendPacket( VMBUS_CHANNEL *Channel, const void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId, VMBUS_PACKET_TYPE Type, - UINT32 Flags + u32 Flags ); static int VmbusChannelSendPacketPageBuffer( VMBUS_CHANNEL *Channel, PAGE_BUFFER PageBuffers[], - UINT32 PageCount, + u32 PageCount, void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId ); @@ -103,7 +103,7 @@ VmbusChannelSendPacketMultiPageBuffer( VMBUS_CHANNEL *Channel, MULTIPAGE_BUFFER *MultiPageBuffer, void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId ); @@ -111,22 +111,22 @@ static int VmbusChannelEstablishGpadl( VMBUS_CHANNEL *Channel, void * Kbuffer, // from kmalloc() - UINT32 Size, // page-size multiple - UINT32 *GpadlHandle + u32 Size, // page-size multiple + u32 *GpadlHandle ); static int VmbusChannelTeardownGpadl( VMBUS_CHANNEL *Channel, - UINT32 GpadlHandle + u32 GpadlHandle ); static int VmbusChannelRecvPacket( VMBUS_CHANNEL *Channel, void * Buffer, - UINT32 BufferLen, - UINT32* BufferActualLen, + u32 BufferLen, + u32* BufferActualLen, UINT64* RequestId ); @@ -134,8 +134,8 @@ static int VmbusChannelRecvPacketRaw( VMBUS_CHANNEL *Channel, void * Buffer, - UINT32 BufferLen, - UINT32* BufferActualLen, + u32 BufferLen, + u32* BufferActualLen, UINT64* RequestId ); diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c index 61f83340635e73effec2b79edfbfaebc9d747247..57602f704e81a3c05668fd8c770d817b47096a17 100644 --- a/drivers/staging/hv/ChannelInterface.c +++ b/drivers/staging/hv/ChannelInterface.c @@ -26,10 +26,10 @@ static int IVmbusChannelOpen( PDEVICE_OBJECT Device, - UINT32 SendBufferSize, - UINT32 RecvRingBufferSize, + u32 SendBufferSize, + u32 RecvRingBufferSize, void * UserData, - UINT32 UserDataLen, + u32 UserDataLen, VMBUS_CHANNEL_CALLBACK ChannelCallback, void * Context ) @@ -57,10 +57,10 @@ static int IVmbusChannelSendPacket( PDEVICE_OBJECT Device, const void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId, - UINT32 Type, - UINT32 Flags + u32 Type, + u32 Flags ) { return VmbusChannelSendPacket((VMBUS_CHANNEL*)Device->context, @@ -75,9 +75,9 @@ static int IVmbusChannelSendPacketPageBuffer( PDEVICE_OBJECT Device, PAGE_BUFFER PageBuffers[], - UINT32 PageCount, + u32 PageCount, void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId ) { @@ -94,7 +94,7 @@ IVmbusChannelSendPacketMultiPageBuffer( PDEVICE_OBJECT Device, MULTIPAGE_BUFFER *MultiPageBuffer, void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId ) { @@ -109,8 +109,8 @@ static int IVmbusChannelRecvPacket ( PDEVICE_OBJECT Device, void * Buffer, - UINT32 BufferLen, - UINT32* BufferActualLen, + u32 BufferLen, + u32* BufferActualLen, UINT64* RequestId ) { @@ -125,8 +125,8 @@ static int IVmbusChannelRecvPacketRaw( PDEVICE_OBJECT Device, void * Buffer, - UINT32 BufferLen, - UINT32* BufferActualLen, + u32 BufferLen, + u32* BufferActualLen, UINT64* RequestId ) { @@ -141,8 +141,8 @@ static int IVmbusChannelEstablishGpadl( PDEVICE_OBJECT Device, void * Buffer, - UINT32 BufferLen, - UINT32* GpadlHandle + u32 BufferLen, + u32* GpadlHandle ) { return VmbusChannelEstablishGpadl((VMBUS_CHANNEL*)Device->context, @@ -154,7 +154,7 @@ IVmbusChannelEstablishGpadl( static int IVmbusChannelTeardownGpadl( PDEVICE_OBJECT Device, - UINT32 GpadlHandle + u32 GpadlHandle ) { return VmbusChannelTeardownGpadl((VMBUS_CHANNEL*)Device->context, diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h index 06308a45dd7a308ef3749b198bf753b91df400c1..b1ea2fc280c2d8671a92072edbd715a542643cb4 100644 --- a/drivers/staging/hv/ChannelMgmt.h +++ b/drivers/staging/hv/ChannelMgmt.h @@ -56,11 +56,11 @@ typedef struct _VMBUS_CHANNEL { u8 MonitorGroup; u8 MonitorBit; - UINT32 RingBufferGpadlHandle; + u32 RingBufferGpadlHandle; // Allocated memory for ring buffer void * RingBufferPages; - UINT32 RingBufferPageCount; + u32 RingBufferPageCount; RING_BUFFER_INFO Outbound; // send to parent RING_BUFFER_INFO Inbound; // receive from parent HANDLE InboundLock; @@ -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; @@ -117,7 +117,7 @@ typedef struct _VMBUS_CHANNEL_MSGINFO { VMBUS_CHANNEL_MESSAGE_RESPONSE Response; - UINT32 MessageSize; + 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]; diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c index f3e1360564b41d3c16e65650a4331693506e7505..0e9f0d71925533169f7193c8d88db4a06c4c1d5b 100644 --- a/drivers/staging/hv/Connection.c +++ b/drivers/staging/hv/Connection.c @@ -253,7 +253,7 @@ VmbusDisconnect( --*/ VMBUS_CHANNEL* GetChannelFromRelId( - UINT32 relId + u32 relId ) { VMBUS_CHANNEL* channel; @@ -294,7 +294,7 @@ VmbusProcessChannelEvent( ) { VMBUS_CHANNEL* channel; - UINT32 relId = (UINT32)(ULONG_PTR)context; + u32 relId = (u32)(ULONG_PTR)context; ASSERT(relId > 0); @@ -333,7 +333,7 @@ VmbusOnEvents( int maxdword = MAX_NUM_CHANNELS_SUPPORTED >> 5; int bit; int relid; - UINT32* recvInterruptPage = gVmbusConnection.RecvInterruptPage; + u32* recvInterruptPage = gVmbusConnection.RecvInterruptPage; //VMBUS_CHANNEL_MESSAGE* receiveMsg; DPRINT_ENTER(VMBUS); @@ -393,7 +393,7 @@ VmbusPostMessage( HV_CONNECTION_ID connId; - connId.AsUINT32 =0; + connId.Asu32 =0; connId.u.Id = VMBUS_MESSAGE_CONNECTION_ID; ret = HvPostMessage( connId, @@ -414,14 +414,14 @@ VmbusPostMessage( --*/ int -VmbusSetEvent(UINT32 childRelId) +VmbusSetEvent(u32 childRelId) { int ret=0; DPRINT_ENTER(VMBUS); - // Each UINT32 represents 32 channels - BitSet((UINT32*)gVmbusConnection.SendInterruptPage + (childRelId >> 5), childRelId & 31); + // Each u32 represents 32 channels + BitSet((u32*)gVmbusConnection.SendInterruptPage + (childRelId >> 5), childRelId & 31); ret = HvSignalEvent(); DPRINT_EXIT(VMBUS); diff --git a/drivers/staging/hv/Hv.c b/drivers/staging/hv/Hv.c index 3a37c12a59a8cd80826c4dd49ea0de5178f34728..20686d574a4d07b52ecc0c18b3fe299790d3e4f8 100644 --- a/drivers/staging/hv/Hv.c +++ b/drivers/staging/hv/Hv.c @@ -188,16 +188,16 @@ HvDoHypercall ( #else - UINT32 controlHi = Control >> 32; - UINT32 controlLo = Control & 0xFFFFFFFF; - UINT32 hvStatusHi = 1; - UINT32 hvStatusLo = 1; + u32 controlHi = Control >> 32; + u32 controlLo = Control & 0xFFFFFFFF; + u32 hvStatusHi = 1; + u32 hvStatusLo = 1; UINT64 inputAddress = (Input) ? GetPhysicalAddress(Input) : 0; - UINT32 inputAddressHi = inputAddress >> 32; - UINT32 inputAddressLo = inputAddress & 0xFFFFFFFF; + u32 inputAddressHi = inputAddress >> 32; + u32 inputAddressLo = inputAddress & 0xFFFFFFFF; UINT64 outputAddress = (Output) ?GetPhysicalAddress(Output) : 0; - UINT32 outputAddressHi = outputAddress >> 32; - UINT32 outputAddressLo = outputAddress & 0xFFFFFFFF; + u32 outputAddressHi = outputAddress >> 32; + u32 outputAddressLo = outputAddress & 0xFFFFFFFF; volatile void* hypercallPage = gHvContext.HypercallPage; DPRINT_DBG(VMBUS, "Hypercall ", @@ -312,7 +312,7 @@ HvInit ( } gHvContext.SignalEventParam = (PHV_INPUT_SIGNAL_EVENT)(ALIGN_UP((ULONG_PTR)gHvContext.SignalEventBuffer, HV_HYPERCALL_PARAM_ALIGN)); - gHvContext.SignalEventParam->ConnectionId.AsUINT32 = 0; + gHvContext.SignalEventParam->ConnectionId.Asu32 = 0; gHvContext.SignalEventParam->ConnectionId.u.Id = VMBUS_EVENT_CONNECTION_ID; gHvContext.SignalEventParam->FlagNumber = 0; gHvContext.SignalEventParam->RsvdZ = 0; @@ -471,7 +471,7 @@ HvSignalEvent( --*/ int HvSynicInit ( - UINT32 irqVector + u32 irqVector ) { UINT64 version; diff --git a/drivers/staging/hv/Hv.h b/drivers/staging/hv/Hv.h index b75ad5df23ff666d8d88c57a449879725280c0dc..f5cbad9f20b0b2e0fd6b8b46784568b40d15596f 100644 --- a/drivers/staging/hv/Hv.h +++ b/drivers/staging/hv/Hv.h @@ -173,7 +173,7 @@ HvSignalEvent( static int HvSynicInit( - UINT32 irqVector + u32 irqVector ); static void diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index 11b78f4cf755584af5bbe6cf3fcbf2890159931e..958ce603e65abcfe50ed232ac95e827a9fc43129 100644 --- a/drivers/staging/hv/NetVsc.c +++ b/drivers/staging/hv/NetVsc.c @@ -1402,7 +1402,7 @@ NetVscOnChannelCallback( DEVICE_OBJECT *device=(DEVICE_OBJECT*)Context; NETVSC_DEVICE *netDevice; - UINT32 bytesRecvd; + u32 bytesRecvd; UINT64 requestId; UCHAR packet[netPacketSize]; VMPACKET_DESCRIPTOR *desc; diff --git a/drivers/staging/hv/NetVsc.h b/drivers/staging/hv/NetVsc.h index 2371b85c2680fc348e7641803773e93722415b1c..f19497a3e1dd6789a971f66899d617535cb5b151 100644 --- a/drivers/staging/hv/NetVsc.h +++ b/drivers/staging/hv/NetVsc.h @@ -66,15 +66,15 @@ typedef struct _NETVSC_DEVICE { // Send buffer allocated by us but manages by NetVSP void * SendBuffer; - UINT32 SendBufferSize; - UINT32 SendBufferGpadlHandle; - UINT32 SendSectionSize; + u32 SendBufferSize; + u32 SendBufferGpadlHandle; + u32 SendSectionSize; // Receive buffer allocated by us but manages by NetVSP void * ReceiveBuffer; - UINT32 ReceiveBufferSize; - UINT32 ReceiveBufferGpadlHandle; - UINT32 ReceiveSectionCount; + u32 ReceiveBufferSize; + u32 ReceiveBufferGpadlHandle; + u32 ReceiveSectionCount; PNVSP_1_RECEIVE_BUFFER_SECTION ReceiveSections; // Used for NetVSP initialization protocol diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c index a8df47e13eb2aaae788833412c3703e76c90ee5d..4a05f7d7d2df6fb5fde610bb2a2fac4263ee0690 100644 --- a/drivers/staging/hv/RingBuffer.c +++ b/drivers/staging/hv/RingBuffer.c @@ -44,9 +44,9 @@ --*/ static inline void -GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, UINT32 *read, UINT32 *write) +GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, u32 *read, u32 *write) { - UINT32 read_loc,write_loc; + u32 read_loc,write_loc; // Capture the read/write indices before they changed read_loc = rbi->RingBuffer->ReadIndex; @@ -65,10 +65,10 @@ GetRingBufferAvailBytes(RING_BUFFER_INFO *rbi, UINT32 *read, UINT32 *write) Get the next write location for the specified ring buffer --*/ -static inline UINT32 +static inline u32 GetNextWriteLocation(RING_BUFFER_INFO* RingInfo) { - UINT32 next = RingInfo->RingBuffer->WriteIndex; + u32 next = RingInfo->RingBuffer->WriteIndex; ASSERT(next < RingInfo->RingDataSize); @@ -85,7 +85,7 @@ GetNextWriteLocation(RING_BUFFER_INFO* RingInfo) --*/ static inline void -SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextWriteLocation) +SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, u32 NextWriteLocation) { RingInfo->RingBuffer->WriteIndex = NextWriteLocation; } @@ -99,10 +99,10 @@ SetNextWriteLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextWriteLocation) Get the next read location for the specified ring buffer --*/ -static inline UINT32 +static inline u32 GetNextReadLocation(RING_BUFFER_INFO* RingInfo) { - UINT32 next = RingInfo->RingBuffer->ReadIndex; + u32 next = RingInfo->RingBuffer->ReadIndex; ASSERT(next < RingInfo->RingDataSize); @@ -119,10 +119,10 @@ GetNextReadLocation(RING_BUFFER_INFO* RingInfo) This allows the caller to skip --*/ -static inline UINT32 -GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, UINT32 Offset) +static inline u32 +GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, u32 Offset) { - UINT32 next = RingInfo->RingBuffer->ReadIndex; + u32 next = RingInfo->RingBuffer->ReadIndex; ASSERT(next < RingInfo->RingDataSize); next += Offset; @@ -141,7 +141,7 @@ GetNextReadLocationWithOffset(RING_BUFFER_INFO* RingInfo, UINT32 Offset) --*/ static inline void -SetNextReadLocation(RING_BUFFER_INFO* RingInfo, UINT32 NextReadLocation) +SetNextReadLocation(RING_BUFFER_INFO* RingInfo, u32 NextReadLocation) { RingInfo->RingBuffer->ReadIndex = NextReadLocation; } @@ -172,7 +172,7 @@ GetRingBuffer(RING_BUFFER_INFO* RingInfo) Get the size of the ring buffer --*/ -static inline UINT32 +static inline u32 GetRingBufferSize(RING_BUFFER_INFO* RingInfo) { return RingInfo->RingDataSize; @@ -206,8 +206,8 @@ GetRingBufferIndices(RING_BUFFER_INFO* RingInfo) void DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix) { - UINT32 bytesAvailToWrite; - UINT32 bytesAvailToRead; + u32 bytesAvailToWrite; + u32 bytesAvailToRead; GetRingBufferAvailBytes(RingInfo, &bytesAvailToRead, &bytesAvailToWrite); @@ -224,19 +224,19 @@ DumpRingInfo(RING_BUFFER_INFO* RingInfo, char *Prefix) // // Internal routines // -static UINT32 +static u32 CopyToRingBuffer( RING_BUFFER_INFO *RingInfo, - UINT32 StartWriteOffset, + u32 StartWriteOffset, void * Src, - UINT32 SrcLen); + u32 SrcLen); -static UINT32 +static u32 CopyFromRingBuffer( RING_BUFFER_INFO *RingInfo, void * Dest, - UINT32 DestLen, - UINT32 StartReadOffset); + u32 DestLen, + u32 StartReadOffset); @@ -255,8 +255,8 @@ RingBufferGetDebugInfo( RING_BUFFER_DEBUG_INFO *DebugInfo ) { - UINT32 bytesAvailToWrite; - UINT32 bytesAvailToRead; + u32 bytesAvailToWrite; + u32 bytesAvailToRead; if (RingInfo->RingBuffer) { @@ -281,7 +281,7 @@ RingBufferGetDebugInfo( Get the interrupt mask for the specified ring buffer --*/ -UINT32 +u32 GetRingBufferInterruptMask( RING_BUFFER_INFO *rbi ) @@ -302,7 +302,7 @@ int RingBufferInit( RING_BUFFER_INFO *RingInfo, void *Buffer, - UINT32 BufferLen + u32 BufferLen ) { ASSERT(sizeof(RING_BUFFER) == PAGE_SIZE); @@ -350,15 +350,15 @@ int RingBufferWrite( RING_BUFFER_INFO* OutRingInfo, SG_BUFFER_LIST SgBuffers[], - UINT32 SgBufferCount + u32 SgBufferCount ) { int i=0; - UINT32 byteAvailToWrite; - UINT32 byteAvailToRead; - UINT32 totalBytesToWrite=0; + u32 byteAvailToWrite; + u32 byteAvailToRead; + u32 totalBytesToWrite=0; - volatile UINT32 nextWriteLocation; + volatile u32 nextWriteLocation; UINT64 prevIndices=0; DPRINT_ENTER(VMBUS); @@ -439,12 +439,12 @@ int RingBufferPeek( RING_BUFFER_INFO* InRingInfo, void* Buffer, - UINT32 BufferLen + u32 BufferLen ) { - UINT32 bytesAvailToWrite; - UINT32 bytesAvailToRead; - UINT32 nextReadLocation=0; + u32 bytesAvailToWrite; + u32 bytesAvailToRead; + u32 nextReadLocation=0; SpinlockAcquire(InRingInfo->RingLock); @@ -487,13 +487,13 @@ int RingBufferRead( RING_BUFFER_INFO* InRingInfo, void * Buffer, - UINT32 BufferLen, - UINT32 Offset + u32 BufferLen, + u32 Offset ) { - UINT32 bytesAvailToWrite; - UINT32 bytesAvailToRead; - UINT32 nextReadLocation=0; + u32 bytesAvailToWrite; + u32 bytesAvailToRead; + u32 nextReadLocation=0; UINT64 prevIndices=0; ASSERT(BufferLen > 0); @@ -553,16 +553,16 @@ RingBufferRead( Assume there is enough room. Handles wrap-around in dest case only!! --*/ -UINT32 +u32 CopyToRingBuffer( RING_BUFFER_INFO *RingInfo, - UINT32 StartWriteOffset, + u32 StartWriteOffset, void * Src, - UINT32 SrcLen) + u32 SrcLen) { void * ringBuffer=GetRingBuffer(RingInfo); - UINT32 ringBufferSize=GetRingBufferSize(RingInfo); - UINT32 fragLen; + u32 ringBufferSize=GetRingBufferSize(RingInfo); + u32 fragLen; if (SrcLen > ringBufferSize - StartWriteOffset) // wrap-around detected! { @@ -594,17 +594,17 @@ CopyToRingBuffer( Assume there is enough room. Handles wrap-around in src case only!! --*/ -UINT32 +u32 CopyFromRingBuffer( RING_BUFFER_INFO *RingInfo, void * Dest, - UINT32 DestLen, - UINT32 StartReadOffset) + u32 DestLen, + u32 StartReadOffset) { void * ringBuffer=GetRingBuffer(RingInfo); - UINT32 ringBufferSize=GetRingBufferSize(RingInfo); + u32 ringBufferSize=GetRingBufferSize(RingInfo); - UINT32 fragLen; + u32 fragLen; if (DestLen > ringBufferSize - StartReadOffset) // wrap-around detected at the src { diff --git a/drivers/staging/hv/RingBuffer.h b/drivers/staging/hv/RingBuffer.h index a190b3a6d30194063d5f0402ff0a20fa34d190f6..c5ecf41a00e698754ca81275b5486b7400d717bf 100644 --- a/drivers/staging/hv/RingBuffer.h +++ b/drivers/staging/hv/RingBuffer.h @@ -29,39 +29,39 @@ typedef struct _SG_BUFFER_LIST { void * Data; - UINT32 Length; + u32 Length; } SG_BUFFER_LIST; typedef struct _RING_BUFFER { - volatile UINT32 WriteIndex; // Offset in bytes from the start of ring data below - volatile UINT32 ReadIndex; // Offset in bytes from the start of ring data below + volatile u32 WriteIndex; // Offset in bytes from the start of ring data below + volatile u32 ReadIndex; // Offset in bytes from the start of ring data below - volatile UINT32 InterruptMask; + volatile u32 InterruptMask; u8 Reserved[4084]; // Pad it to PAGE_SIZE so that data starts on page boundary // NOTE: The InterruptMask field is used only for channels but since our vmbus connection // also uses this data structure and its data starts here, we commented out this field. - // volatile UINT32 InterruptMask; + // volatile u32 InterruptMask; // Ring data starts here + RingDataStartOffset !!! DO NOT place any fields below this !!! u8 Buffer[0]; } STRUCT_PACKED RING_BUFFER; typedef struct _RING_BUFFER_INFO { RING_BUFFER* RingBuffer; - UINT32 RingSize; // Include the shared header + u32 RingSize; // Include the shared header HANDLE RingLock; - UINT32 RingDataSize; // < ringSize - UINT32 RingDataStartOffset; + u32 RingDataSize; // < ringSize + u32 RingDataStartOffset; } RING_BUFFER_INFO; typedef struct _RING_BUFFER_DEBUG_INFO { - UINT32 CurrentInterruptMask; - UINT32 CurrentReadIndex; - UINT32 CurrentWriteIndex; - UINT32 BytesAvailToRead; - UINT32 BytesAvailToWrite; + u32 CurrentInterruptMask; + u32 CurrentReadIndex; + u32 CurrentWriteIndex; + u32 BytesAvailToRead; + u32 BytesAvailToWrite; }RING_BUFFER_DEBUG_INFO; @@ -73,7 +73,7 @@ static int RingBufferInit( RING_BUFFER_INFO *RingInfo, void * Buffer, - UINT32 BufferLen + u32 BufferLen ); static void @@ -85,25 +85,25 @@ static int RingBufferWrite( RING_BUFFER_INFO *RingInfo, SG_BUFFER_LIST SgBuffers[], - UINT32 SgBufferCount + u32 SgBufferCount ); static int RingBufferPeek( RING_BUFFER_INFO *RingInfo, void * Buffer, - UINT32 BufferLen + u32 BufferLen ); static int RingBufferRead( RING_BUFFER_INFO *RingInfo, void * Buffer, - UINT32 BufferLen, - UINT32 Offset + u32 BufferLen, + u32 Offset ); -static UINT32 +static u32 GetRingBufferInterruptMask( RING_BUFFER_INFO *RingInfo ); diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index 6d9ca8d46e535ccb17c97e3c5b74f88e990cc391..ee56e0a621b72774bb27122b89a1893feda6cc2a 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c @@ -50,8 +50,8 @@ typedef struct _RNDIS_DEVICE { NETVSC_DEVICE *NetDevice; RNDIS_DEVICE_STATE State; - UINT32 LinkStatus; - UINT32 NewRequestId; + u32 LinkStatus; + u32 NewRequestId; HANDLE RequestLock; LIST_ENTRY RequestList; @@ -120,9 +120,9 @@ RndisFilterOnReceive( static int RndisFilterQueryDevice( RNDIS_DEVICE *Device, - UINT32 Oid, + u32 Oid, void *Result, - UINT32 *ResultSize + u32 *ResultSize ); static inline int @@ -138,7 +138,7 @@ RndisFilterQueryDeviceLinkStatus( static int RndisFilterSetPacketFilter( RNDIS_DEVICE *Device, - UINT32 NewFilter + u32 NewFilter ); static int @@ -235,7 +235,7 @@ static inline void PutRndisDevice(RNDIS_DEVICE *Device) MemFree(Device); } -static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, UINT32 MessageType, UINT32 MessageLength) +static inline RNDIS_REQUEST* GetRndisRequest(RNDIS_DEVICE *Device, u32 MessageType, u32 MessageLength) { RNDIS_REQUEST *request; RNDIS_MESSAGE *rndisMessage; @@ -465,7 +465,7 @@ RndisFilterReceiveData( ) { RNDIS_PACKET *rndisPacket; - UINT32 dataOffset; + u32 dataOffset; DPRINT_ENTER(NETVSC); @@ -585,13 +585,13 @@ RndisFilterOnReceive( static int RndisFilterQueryDevice( RNDIS_DEVICE *Device, - UINT32 Oid, + u32 Oid, void *Result, - UINT32 *ResultSize + u32 *ResultSize ) { RNDIS_REQUEST *request; - UINT32 inresultSize = *ResultSize; + u32 inresultSize = *ResultSize; RNDIS_QUERY_REQUEST *query; RNDIS_QUERY_COMPLETE *queryComplete; int ret=0; @@ -653,7 +653,7 @@ RndisFilterQueryDeviceMac( RNDIS_DEVICE *Device ) { - UINT32 size=HW_MACADDR_LEN; + u32 size=HW_MACADDR_LEN; return RndisFilterQueryDevice(Device, RNDIS_OID_802_3_PERMANENT_ADDRESS, @@ -666,7 +666,7 @@ RndisFilterQueryDeviceLinkStatus( RNDIS_DEVICE *Device ) { - UINT32 size=sizeof(UINT32); + u32 size=sizeof(u32); return RndisFilterQueryDevice(Device, RNDIS_OID_GEN_MEDIA_CONNECT_STATUS, @@ -677,20 +677,20 @@ RndisFilterQueryDeviceLinkStatus( static int RndisFilterSetPacketFilter( RNDIS_DEVICE *Device, - UINT32 NewFilter + u32 NewFilter ) { RNDIS_REQUEST *request; RNDIS_SET_REQUEST *set; RNDIS_SET_COMPLETE *setComplete; - UINT32 status; + u32 status; int ret; DPRINT_ENTER(NETVSC); - ASSERT(RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(UINT32) <= sizeof(RNDIS_MESSAGE)); + ASSERT(RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(u32) <= sizeof(RNDIS_MESSAGE)); - request = GetRndisRequest(Device, REMOTE_NDIS_SET_MSG, RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(UINT32)); + request = GetRndisRequest(Device, REMOTE_NDIS_SET_MSG, RNDIS_MESSAGE_SIZE(RNDIS_SET_REQUEST) + sizeof(u32)); if (!request) { ret = -1; @@ -700,10 +700,10 @@ RndisFilterSetPacketFilter( // Setup the rndis set set = &request->RequestMessage.Message.SetRequest; set->Oid = RNDIS_OID_GEN_CURRENT_PACKET_FILTER; - set->InformationBufferLength = sizeof(UINT32); + set->InformationBufferLength = sizeof(u32); set->InformationBufferOffset = sizeof(RNDIS_SET_REQUEST); - memcpy((void*)(ULONG_PTR)set + sizeof(RNDIS_SET_REQUEST), &NewFilter, sizeof(UINT32)); + memcpy((void*)(ULONG_PTR)set + sizeof(RNDIS_SET_REQUEST), &NewFilter, sizeof(u32)); ret = RndisFilterSendRequest(Device, request); if (ret != 0) @@ -795,7 +795,7 @@ RndisFilterInitDevice( RNDIS_REQUEST *request; RNDIS_INITIALIZE_REQUEST *init; RNDIS_INITIALIZE_COMPLETE *initComplete; - UINT32 status; + u32 status; int ret; DPRINT_ENTER(NETVSC); @@ -1091,7 +1091,7 @@ RndisFilterOnSend( RNDIS_FILTER_PACKET *filterPacket; RNDIS_MESSAGE *rndisMessage; RNDIS_PACKET *rndisPacket; - UINT32 rndisMessageSize; + u32 rndisMessageSize; DPRINT_ENTER(NETVSC); diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c index 7750d3224e7a6ff48672017a69faa5b5a88808ae..2b388d1bc9ff5bd7f814d8bb2e54d4ff8a522c44 100644 --- a/drivers/staging/hv/StorVsc.c +++ b/drivers/staging/hv/StorVsc.c @@ -908,7 +908,7 @@ StorVscOnChannelCallback( int ret=0; DEVICE_OBJECT *device = (DEVICE_OBJECT*)Context; STORVSC_DEVICE *storDevice; - UINT32 bytesRecvd; + u32 bytesRecvd; UINT64 requestId; UCHAR packet[ALIGN_UP(sizeof(VSTOR_PACKET),8)]; STORVSC_REQUEST_EXTENSION *request; diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index 8bfec126e0a5813b91a39e857f60be428423491e..3803915622b8b6d58f297581cfdf27f81abcc442 100644 --- a/drivers/staging/hv/Vmbus.c +++ b/drivers/staging/hv/Vmbus.c @@ -307,7 +307,7 @@ VmbusOnDeviceAdd( void *AdditionalInfo ) { - UINT32 *irqvector = (UINT32*) AdditionalInfo; + u32 *irqvector = (u32*) AdditionalInfo; int ret=0; DPRINT_ENTER(VMBUS); diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h index 1e54b2463f96258e5720b410942a660e3e6b433d..383ab3206082379224eed5c93b9af50eb4c50df9 100644 --- a/drivers/staging/hv/VmbusPrivate.h +++ b/drivers/staging/hv/VmbusPrivate.h @@ -64,7 +64,7 @@ typedef struct _VMBUS_CONNECTION { VMBUS_CONNECT_STATE ConnectState; - UINT32 NextGpadlHandle; + u32 NextGpadlHandle; // Represents channel interrupts. Each bit position // represents a channel. @@ -130,7 +130,7 @@ VmbusChildDeviceRemove( static VMBUS_CHANNEL* GetChannelFromRelId( - UINT32 relId + u32 relId ); // @@ -154,7 +154,7 @@ VmbusPostMessage( static int VmbusSetEvent( - UINT32 childRelId + u32 childRelId ); static void diff --git a/drivers/staging/hv/include/ChannelMessages.h b/drivers/staging/hv/include/ChannelMessages.h index 0f52e7116992f1f4d7d0e1f07c52cf53ff22369c..5ec22f80bfbc356a3fcebc0741e85a0c29675eb9 100644 --- a/drivers/staging/hv/include/ChannelMessages.h +++ b/drivers/staging/hv/include/ChannelMessages.h @@ -27,7 +27,7 @@ #include "VmbusPacketFormat.h" #define C_ASSERT(x) -typedef UINT32 NTSTATUS; +typedef u32 NTSTATUS; #pragma pack(push,1) @@ -68,14 +68,14 @@ typedef enum _VMBUS_CHANNEL_MESSAGE_TYPE typedef struct _VMBUS_CHANNEL_MESSAGE_HEADER { VMBUS_CHANNEL_MESSAGE_TYPE MessageType; - UINT32 Padding; + u32 Padding; } VMBUS_CHANNEL_MESSAGE_HEADER, *PVMBUS_CHANNEL_MESSAGE_HEADER; // Query VMBus Version parameters typedef struct _VMBUS_CHANNEL_QUERY_VMBUS_VERSION { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 Version; + u32 Version; } VMBUS_CHANNEL_QUERY_VMBUS_VERSION, *PVMBUS_CHANNEL_QUERY_VMBUS_VERSION; // VMBus Version Supported parameters @@ -90,7 +90,7 @@ typedef struct _VMBUS_CHANNEL_OFFER_CHANNEL { VMBUS_CHANNEL_MESSAGE_HEADER Header; VMBUS_CHANNEL_OFFER Offer; - UINT32 ChildRelId; + u32 ChildRelId; u8 MonitorId; BOOLEAN MonitorAllocated; } VMBUS_CHANNEL_OFFER_CHANNEL, *PVMBUS_CHANNEL_OFFER_CHANNEL; @@ -104,7 +104,7 @@ C_ASSERT(sizeof(VMBUS_CHANNEL_OFFER_CHANNEL) <= MAXIMUM_SYNIC_MESSAGE_BYTES); typedef struct _VMBUS_CHANNEL_RESCIND_OFFER { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 ChildRelId; + u32 ChildRelId; } VMBUS_CHANNEL_RESCIND_OFFER, *PVMBUS_CHANNEL_RESCIND_OFFER; // Request Offer -- no parameters, SynIC message contains the partition ID @@ -121,12 +121,12 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL // // Identifies the specific VMBus channel that is being opened. // - UINT32 ChildRelId; + u32 ChildRelId; // // ID making a particular open request at a channel offer unique. // - UINT32 OpenId; + u32 OpenId; // // GPADL for the channel's ring buffer. @@ -143,7 +143,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_CHANNEL // by RingBufferGpadlHandle. The downstream ring buffer follows it at this // offset (in pages). // - UINT32 DownstreamRingBufferPageOffset; + u32 DownstreamRingBufferPageOffset; // // User-specific data to be passed along to the server endpoint. @@ -159,8 +159,8 @@ typedef VMBUS_CHANNEL_OPEN_CHANNEL VMBUS_CHANNEL_REOPEN_CHANNEL, *PVMBUS_CHANNEL typedef struct _VMBUS_CHANNEL_OPEN_RESULT { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 ChildRelId; - UINT32 OpenId; + u32 ChildRelId; + u32 OpenId; NTSTATUS Status; } VMBUS_CHANNEL_OPEN_RESULT, *PVMBUS_CHANNEL_OPEN_RESULT; @@ -168,7 +168,7 @@ typedef struct _VMBUS_CHANNEL_OPEN_RESULT typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 ChildRelId; + u32 ChildRelId; } VMBUS_CHANNEL_CLOSE_CHANNEL, *PVMBUS_CHANNEL_CLOSE_CHANNEL; // Channel Message GPADL @@ -186,8 +186,8 @@ typedef struct _VMBUS_CHANNEL_CLOSE_CHANNEL typedef struct _VMBUS_CHANNEL_GPADL_HEADER { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 ChildRelId; - UINT32 Gpadl; + u32 ChildRelId; + u32 Gpadl; u16 RangeBufLen; u16 RangeCount; GPA_RANGE Range[0]; @@ -201,8 +201,8 @@ typedef struct _VMBUS_CHANNEL_GPADL_HEADER typedef struct _VMBUS_CHANNEL_GPADL_BODY { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 MessageNumber; - UINT32 Gpadl; + u32 MessageNumber; + u32 Gpadl; UINT64 Pfn[0]; } VMBUS_CHANNEL_GPADL_BODY, *PVMBUS_CHANNEL_GPADL_BODY; @@ -210,22 +210,22 @@ typedef struct _VMBUS_CHANNEL_GPADL_BODY typedef struct _VMBUS_CHANNEL_GPADL_CREATED { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 ChildRelId; - UINT32 Gpadl; - UINT32 CreationStatus; + u32 ChildRelId; + u32 Gpadl; + u32 CreationStatus; } VMBUS_CHANNEL_GPADL_CREATED, *PVMBUS_CHANNEL_GPADL_CREATED; typedef struct _VMBUS_CHANNEL_GPADL_TEARDOWN { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 ChildRelId; - UINT32 Gpadl; + u32 ChildRelId; + u32 Gpadl; } VMBUS_CHANNEL_GPADL_TEARDOWN, *PVMBUS_CHANNEL_GPADL_TEARDOWN; typedef struct _VMBUS_CHANNEL_GPADL_TORNDOWN { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 Gpadl; + u32 Gpadl; } VMBUS_CHANNEL_GPADL_TORNDOWN, *PVMBUS_CHANNEL_GPADL_TORNDOWN; #ifdef VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD @@ -234,28 +234,28 @@ typedef struct _VMBUS_CHANNEL_VIEW_RANGE_ADD VMBUS_CHANNEL_MESSAGE_HEADER Header; PHYSICAL_ADDRESS ViewRangeBase; UINT64 ViewRangeLength; - UINT32 ChildRelId; + u32 ChildRelId; } VMBUS_CHANNEL_VIEW_RANGE_ADD, *PVMBUS_CHANNEL_VIEW_RANGE_ADD; typedef struct _VMBUS_CHANNEL_VIEW_RANGE_REMOVE { VMBUS_CHANNEL_MESSAGE_HEADER Header; PHYSICAL_ADDRESS ViewRangeBase; - UINT32 ChildRelId; + u32 ChildRelId; } VMBUS_CHANNEL_VIEW_RANGE_REMOVE, *PVMBUS_CHANNEL_VIEW_RANGE_REMOVE; #endif typedef struct _VMBUS_CHANNEL_RELID_RELEASED { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 ChildRelId; + u32 ChildRelId; } VMBUS_CHANNEL_RELID_RELEASED, *PVMBUS_CHANNEL_RELID_RELEASED; typedef struct _VMBUS_CHANNEL_INITIATE_CONTACT { VMBUS_CHANNEL_MESSAGE_HEADER Header; - UINT32 VMBusVersionRequested; - UINT32 Padding2; + u32 VMBusVersionRequested; + u32 Padding2; UINT64 InterruptPage; UINT64 MonitorPage1; UINT64 MonitorPage2; diff --git a/drivers/staging/hv/include/HvHcApi.h b/drivers/staging/hv/include/HvHcApi.h index 170cefaeeb72097a1653bb21ed93c7c07ef7b96d..d88a93292e22c1f6254a7d67d2f2115e7f638107 100644 --- a/drivers/staging/hv/include/HvHcApi.h +++ b/drivers/staging/hv/include/HvHcApi.h @@ -41,9 +41,9 @@ typedef enum _HV_CALL_CODE typedef struct _HV_INPUT_POST_MESSAGE { HV_CONNECTION_ID ConnectionId; - UINT32 Reserved; + u32 Reserved; HV_MESSAGE_TYPE MessageType; - UINT32 PayloadSize; + u32 PayloadSize; UINT64 Payload[HV_MESSAGE_PAYLOAD_QWORD_COUNT]; } HV_INPUT_POST_MESSAGE, *PHV_INPUT_POST_MESSAGE; diff --git a/drivers/staging/hv/include/HvSynicApi.h b/drivers/staging/hv/include/HvSynicApi.h index f0682a391dae27f1e367e7c9339e14ce8a755504..753b027281172ecffac90120ff2904f0622edaed 100644 --- a/drivers/staging/hv/include/HvSynicApi.h +++ b/drivers/staging/hv/include/HvSynicApi.h @@ -84,7 +84,7 @@ #define HV_EVENT_FLAGS_COUNT (256 * 8) #define HV_EVENT_FLAGS_BYTE_COUNT (256) -#define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(UINT32)) +#define HV_EVENT_FLAGS_DWORD_COUNT (256 / sizeof(u32)) // // Define hypervisor message types. @@ -139,7 +139,7 @@ typedef enum _HV_MESSAGE_TYPE // Define the synthetic interrupt source index type. // -typedef UINT32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX; +typedef u32 HV_SYNIC_SINT_INDEX, *PHV_SYNIC_SINT_INDEX; // // Define partition identifier type. @@ -158,12 +158,12 @@ typedef UINT64 HV_PARTITION_ID, *PHV_PARTITION_ID; typedef union _HV_CONNECTION_ID { - UINT32 AsUINT32; + u32 Asu32; struct { - UINT32 Id:24; - UINT32 Reserved:8; + u32 Id:24; + u32 Reserved:8; } u; } HV_CONNECTION_ID, *PHV_CONNECTION_ID; @@ -174,12 +174,12 @@ typedef union _HV_CONNECTION_ID typedef union _HV_PORT_ID { - UINT32 AsUINT32; + u32 Asu32; struct { - UINT32 Id:24; - UINT32 Reserved:8; + u32 Id:24; + u32 Reserved:8; } u ; } HV_PORT_ID, *PHV_PORT_ID; @@ -202,7 +202,7 @@ typedef enum _HV_PORT_TYPE typedef struct _HV_PORT_INFO { HV_PORT_TYPE PortType; - UINT32 Padding; + u32 Padding; union { @@ -219,7 +219,7 @@ typedef struct _HV_PORT_INFO HV_VP_INDEX TargetVp; u16 BaseFlagNumber; u16 FlagCount; - UINT32 RsvdZ; + u32 RsvdZ; } EventPortInfo; struct @@ -235,7 +235,7 @@ typedef const HV_PORT_INFO *PCHV_PORT_INFO; typedef struct _HV_CONNECTION_INFO { HV_PORT_TYPE PortType; - UINT32 Padding; + u32 Padding; union { @@ -296,8 +296,8 @@ typedef struct _HV_MESSAGE_HEADER // typedef struct _HV_TIMER_MESSAGE_PAYLOAD { - UINT32 TimerIndex; - UINT32 Reserved; + u32 TimerIndex; + u32 Reserved; HV_NANO100_TIME ExpirationTime; // When the timer expired HV_NANO100_TIME DeliveryTime; // When the message was delivered } HV_TIMER_MESSAGE_PAYLOAD, *PHV_TIMER_MESSAGE_PAYLOAD; @@ -338,7 +338,7 @@ typedef struct _HV_MESSAGE_PAGE typedef union _HV_SYNIC_EVENT_FLAGS { u8 Flags8[HV_EVENT_FLAGS_BYTE_COUNT]; - UINT32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT]; + u32 Flags32[HV_EVENT_FLAGS_DWORD_COUNT]; } HV_SYNIC_EVENT_FLAGS, *PHV_SYNIC_EVENT_FLAGS; @@ -422,8 +422,8 @@ typedef union _HV_MONITOR_TRIGGER_GROUP struct { - UINT32 Pending; - UINT32 Armed; + u32 Pending; + u32 Armed; }; } HV_MONITOR_TRIGGER_GROUP, *PHV_MONITOR_TRIGGER_GROUP; @@ -437,12 +437,12 @@ typedef struct _HV_MONITOR_PARAMETER typedef union _HV_MONITOR_TRIGGER_STATE { - UINT32 AsUINT32; + u32 Asu32; struct { - UINT32 GroupEnable : 4; - UINT32 RsvdZ : 28; + u32 GroupEnable : 4; + u32 RsvdZ : 28; }; } HV_MONITOR_TRIGGER_STATE, *PHV_MONITOR_TRIGGER_STATE; @@ -471,12 +471,12 @@ typedef union _HV_MONITOR_TRIGGER_STATE typedef struct _HV_MONITOR_PAGE { HV_MONITOR_TRIGGER_STATE TriggerState; - UINT32 RsvdZ1; + u32 RsvdZ1; HV_MONITOR_TRIGGER_GROUP TriggerGroup[4]; UINT64 RsvdZ2[3]; - INT32 NextCheckTime[4][32]; + s32 NextCheckTime[4][32]; u16 Latency[4][32]; UINT64 RsvdZ3[32]; diff --git a/drivers/staging/hv/include/HvVpApi.h b/drivers/staging/hv/include/HvVpApi.h index 7e5128a0b2f123f49b28647d3d9dc4c5c85c44fa..910a9e5983ee7b4076efaeb5363576dd5281164a 100644 --- a/drivers/staging/hv/include/HvVpApi.h +++ b/drivers/staging/hv/include/HvVpApi.h @@ -26,7 +26,7 @@ // // Virtual Processor Indices // -typedef UINT32 HV_VP_INDEX, *PHV_VP_INDEX; +typedef u32 HV_VP_INDEX, *PHV_VP_INDEX; // // The below CPUID leaves are present if VersionAndFeatures.HypervisorPresent diff --git a/drivers/staging/hv/include/NetVscApi.h b/drivers/staging/hv/include/NetVscApi.h index 8d7bddfdc9d0eb88e0005fb3ab6b53e53f4d55b2..5ae8a3c097b7709b80a97176f381704341956d6a 100644 --- a/drivers/staging/hv/include/NetVscApi.h +++ b/drivers/staging/hv/include/NetVscApi.h @@ -52,14 +52,14 @@ typedef int (*PFN_ON_SEND)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet); typedef void (*PFN_ON_SENDRECVCOMPLETION)(void * Context); typedef int (*PFN_ON_RECVCALLBACK)(DEVICE_OBJECT *dev, PNETVSC_PACKET packet); -typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, UINT32 Status); +typedef void (*PFN_ON_LINKSTATUS_CHANGED)(DEVICE_OBJECT *dev, u32 Status); // Represent the xfer page packet which contains 1 or more netvsc packet typedef struct _XFERPAGE_PACKET { DLIST_ENTRY ListEntry; // # of netvsc packets this xfer packet contains - UINT32 Count; + u32 Count; } XFERPAGE_PACKET; @@ -93,9 +93,9 @@ typedef struct _NETVSC_PACKET { // This points to the memory after PageBuffers void * Extension; - UINT32 TotalDataBufferLength; + u32 TotalDataBufferLength; // Points to the send/receive buffer where the ethernet frame is - UINT32 PageBufferCount; + u32 PageBufferCount; PAGE_BUFFER PageBuffers[NETVSC_PACKET_MAXPAGE]; } NETVSC_PACKET; @@ -105,11 +105,11 @@ typedef struct _NETVSC_PACKET { typedef struct _NETVSC_DRIVER_OBJECT { DRIVER_OBJECT Base; // Must be the first field - UINT32 RingBufferSize; - UINT32 RequestExtSize; + u32 RingBufferSize; + u32 RequestExtSize; // Additional num of page buffers to allocate - UINT32 AdditionalRequestPageBufferCount; + u32 AdditionalRequestPageBufferCount; // This is set by the caller to allow us to callback when we receive a packet // from the "wire" diff --git a/drivers/staging/hv/include/StorVscApi.h b/drivers/staging/hv/include/StorVscApi.h index 7c4dd15d7d1d4188c15ca6f7a788951ab682823d..bd6823e5122e82bbc3b52b663fc88a8e670d7bba 100644 --- a/drivers/staging/hv/include/StorVscApi.h +++ b/drivers/staging/hv/include/StorVscApi.h @@ -71,17 +71,17 @@ typedef enum _STORVSC_REQUEST_TYPE{ typedef struct _STORVSC_REQUEST { STORVSC_REQUEST_TYPE Type; - UINT32 Host; - UINT32 Bus; - UINT32 TargetId; - UINT32 LunId; + u32 Host; + u32 Bus; + u32 TargetId; + u32 LunId; u8 * Cdb; - UINT32 CdbLen; - UINT32 Status; - UINT32 BytesXfer; + u32 CdbLen; + u32 Status; + u32 BytesXfer; UCHAR* SenseBuffer; - UINT32 SenseBufferSize; + u32 SenseBufferSize; void * Context; @@ -99,13 +99,13 @@ typedef struct _STORVSC_DRIVER_OBJECT { DRIVER_OBJECT Base; // Must be the first field // Set by caller (in bytes) - UINT32 RingBufferSize; + u32 RingBufferSize; // Allocate this much private extension for each I/O request - UINT32 RequestExtSize; + u32 RequestExtSize; // Maximum # of requests in flight per channel/device - UINT32 MaxOutstandingRequestsPerChannel; + u32 MaxOutstandingRequestsPerChannel; // Set by the caller to allow us to re-enumerate the bus on the host PFN_ON_HOST_RESCAN OnHostRescan; diff --git a/drivers/staging/hv/include/VmbusApi.h b/drivers/staging/hv/include/VmbusApi.h index adcfbdf2e3088700905cf337a1a99fb3734c457f..ea7e36d9736117ca008ce47d40fee5ef08b7fa3a 100644 --- a/drivers/staging/hv/include/VmbusApi.h +++ b/drivers/staging/hv/include/VmbusApi.h @@ -49,16 +49,16 @@ typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT; // Single-page buffer typedef struct _PAGE_BUFFER { - UINT32 Length; - UINT32 Offset; + u32 Length; + u32 Offset; UINT64 Pfn; } PAGE_BUFFER; // Multiple-page buffer typedef struct _MULTIPAGE_BUFFER { // Length and Offset determines the # of pfns in the array - UINT32 Length; - UINT32 Offset; + u32 Length; + u32 Offset; UINT64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT]; }MULTIPAGE_BUFFER; @@ -92,10 +92,10 @@ typedef void (*VMBUS_CHANNEL_CALLBACK)(void * context); typedef int (*VMBUS_CHANNEL_OPEN)( PDEVICE_OBJECT Device, - UINT32 SendBufferSize, - UINT32 RecvRingBufferSize, + u32 SendBufferSize, + u32 RecvRingBufferSize, void * UserData, - UINT32 UserDataLen, + u32 UserDataLen, VMBUS_CHANNEL_CALLBACK ChannelCallback, void * Context ); @@ -107,18 +107,18 @@ typedef void (*VMBUS_CHANNEL_CLOSE)( typedef int (*VMBUS_CHANNEL_SEND_PACKET)( PDEVICE_OBJECT Device, const void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId, - UINT32 Type, - UINT32 Flags + u32 Type, + u32 Flags ); typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)( PDEVICE_OBJECT Device, PAGE_BUFFER PageBuffers[], - UINT32 PageCount, + u32 PageCount, void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId ); @@ -126,61 +126,61 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)( PDEVICE_OBJECT Device, MULTIPAGE_BUFFER *MultiPageBuffer, void * Buffer, - UINT32 BufferLen, + u32 BufferLen, UINT64 RequestId ); typedef int (*VMBUS_CHANNEL_RECV_PACKET)( PDEVICE_OBJECT Device, void * Buffer, - UINT32 BufferLen, - UINT32* BufferActualLen, + u32 BufferLen, + u32* BufferActualLen, UINT64* RequestId ); typedef int (*VMBUS_CHANNEL_RECV_PACKET_PAW)( PDEVICE_OBJECT Device, void * Buffer, - UINT32 BufferLen, - UINT32* BufferActualLen, + u32 BufferLen, + u32* BufferActualLen, UINT64* RequestId ); typedef int (*VMBUS_CHANNEL_ESTABLISH_GPADL)( PDEVICE_OBJECT Device, void * Buffer, // from kmalloc() - UINT32 BufferLen, // page-size multiple - UINT32* GpadlHandle + u32 BufferLen, // page-size multiple + u32* GpadlHandle ); typedef int (*VMBUS_CHANNEL_TEARDOWN_GPADL)( PDEVICE_OBJECT Device, - UINT32 GpadlHandle + u32 GpadlHandle ); typedef struct _PORT_INFO { - UINT32 InterruptMask; - UINT32 ReadIndex; - UINT32 WriteIndex; - UINT32 BytesAvailToRead; - UINT32 BytesAvailToWrite; + u32 InterruptMask; + u32 ReadIndex; + u32 WriteIndex; + u32 BytesAvailToRead; + u32 BytesAvailToWrite; } PORT_INFO; typedef struct _DEVICE_INFO { - UINT32 ChannelId; - UINT32 ChannelState; + u32 ChannelId; + u32 ChannelState; GUID ChannelType; GUID ChannelInstance; - 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; PORT_INFO Inbound; PORT_INFO Outbound; diff --git a/drivers/staging/hv/include/VmbusChannelInterface.h b/drivers/staging/hv/include/VmbusChannelInterface.h index 87b57d285bdc0cab2139da7dec760ee945fa352a..900e1fc2fb861fadf1dbc38751c86e2eaa7e4687 100644 --- a/drivers/staging/hv/include/VmbusChannelInterface.h +++ b/drivers/staging/hv/include/VmbusChannelInterface.h @@ -67,8 +67,8 @@ typedef struct GUID InterfaceType; GUID InterfaceInstance; UINT64 InterruptLatencyIn100nsUnits; - UINT32 InterfaceRevision; - UINT32 ServerContextAreaSize; // in bytes + u32 InterfaceRevision; + u32 ServerContextAreaSize; // in bytes u16 ChannelFlags; u16 MmioMegabytes; // in bytes * 1024 * 1024 @@ -89,11 +89,11 @@ typedef struct // struct { - UINT32 PipeMode; + u32 PipeMode; UCHAR UserDefined[MAX_PIPE_USER_DEFINED_BYTES]; } Pipe; } u; - UINT32 Padding; + u32 Padding; } VMBUS_CHANNEL_OFFER, *PVMBUS_CHANNEL_OFFER; #pragma pack(pop) @@ -107,7 +107,7 @@ typedef struct // FIELD_OFFSET(VMBUS_CHANNEL_OFFER, u.Standard.UserDefined))); // -typedef UINT32 GPADL_HANDLE; +typedef u32 GPADL_HANDLE; // // Server Flags diff --git a/drivers/staging/hv/include/VmbusPacketFormat.h b/drivers/staging/hv/include/VmbusPacketFormat.h index 1e8b9ceba000a9f27010511cadce12e91711e7a9..7dd489a722ee340809e355a9e5f5af1f245393d2 100644 --- a/drivers/staging/hv/include/VmbusPacketFormat.h +++ b/drivers/staging/hv/include/VmbusPacketFormat.h @@ -41,8 +41,8 @@ typedef struct { struct { - volatile UINT32 In; // Offset in bytes from the ring base - volatile UINT32 Out; // Offset in bytes from the ring base + volatile u32 In; // Offset in bytes from the ring base + volatile u32 Out; // Offset in bytes from the ring base }; volatile LONGLONG InOut; }; @@ -52,7 +52,7 @@ typedef struct // endpoint should not send any interrupts. // - volatile UINT32 InterruptMask; + volatile u32 InterruptMask; } VMRCB, *PVMRCB; @@ -86,7 +86,7 @@ typedef struct UINT64 TransactionId; } VMPACKET_DESCRIPTOR, *PVMPACKET_DESCRIPTOR; -typedef UINT32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET; +typedef u32 PREVIOUS_PACKET_OFFSET, *PPREVIOUS_PACKET_OFFSET; typedef struct { @@ -96,8 +96,8 @@ typedef struct typedef struct { - UINT32 ByteCount; - UINT32 ByteOffset; + u32 ByteCount; + u32 ByteOffset; } VMTRANSFER_PAGE_RANGE, *PVMTRANSFER_PAGE_RANGE; #ifdef __cplusplus @@ -115,7 +115,7 @@ typedef struct VMTRANSFER_PAGE_PACKET_HEADER { u16 TransferPageSetId; BOOLEAN SenderOwnsSet; u8 Reserved; - UINT32 RangeCount; + u32 RangeCount; VMTRANSFER_PAGE_RANGE Ranges[1]; } VMTRANSFER_PAGE_PACKET_HEADER, *PVMTRANSFER_PAGE_PACKET_HEADER; @@ -134,8 +134,8 @@ typedef struct _VMGPADL_PACKET_HEADER { #endif - UINT32 Gpadl; - UINT32 Reserved; + u32 Gpadl; + u32 Reserved; } VMGPADL_PACKET_HEADER, *PVMGPADL_PACKET_HEADER; @@ -151,7 +151,7 @@ typedef struct _VMADD_REMOVE_TRANSFER_PAGE_SET { #endif - UINT32 Gpadl; + u32 Gpadl; u16 TransferPageSetId; u16 Reserved; @@ -166,8 +166,8 @@ typedef struct _VMADD_REMOVE_TRANSFER_PAGE_SET { typedef struct _GPA_RANGE { - UINT32 ByteCount; - UINT32 ByteOffset; + u32 ByteCount; + u32 ByteOffset; UINT64 PfnArray[0]; } GPA_RANGE, *PGPA_RANGE; @@ -196,8 +196,8 @@ typedef struct _VMESTABLISH_GPADL { #endif - UINT32 Gpadl; - UINT32 RangeCount; + u32 Gpadl; + u32 RangeCount; GPA_RANGE Range[1]; } VMESTABLISH_GPADL, *PVMESTABLISH_GPADL; @@ -220,8 +220,8 @@ typedef struct _VMTEARDOWN_GPADL { #endif - UINT32 Gpadl; - UINT32 Reserved; // for alignment to a 8-byte boundary + u32 Gpadl; + u32 Reserved; // for alignment to a 8-byte boundary } VMTEARDOWN_GPADL, *PVMTEARDOWN_GPADL; @@ -242,8 +242,8 @@ typedef struct _VMDATA_GPA_DIRECT { #endif - UINT32 Reserved; - UINT32 RangeCount; + u32 Reserved; + u32 RangeCount; GPA_RANGE Range[1]; } VMDATA_GPA_DIRECT, *PVMDATA_GPA_DIRECT; @@ -267,8 +267,8 @@ typedef struct _VMADDITIONAL_DATA { #endif UINT64 TotalBytes; - UINT32 ByteOffset; - UINT32 ByteCount; + u32 ByteOffset; + u32 ByteCount; UCHAR Data[1]; } VMADDITIONAL_DATA, *PVMADDITIONAL_DATA; diff --git a/drivers/staging/hv/include/nvspprotocol.h b/drivers/staging/hv/include/nvspprotocol.h index e1dd4676d978acad6ee635bee23364929defabd0..702f904ee8d38fb6c2e2a6daa1dbca77e97d284f 100644 --- a/drivers/staging/hv/include/nvspprotocol.h +++ b/drivers/staging/hv/include/nvspprotocol.h @@ -26,7 +26,7 @@ #include "VmbusChannelInterface.h" -#define NVSP_INVALID_PROTOCOL_VERSION ((UINT32)0xFFFFFFFF) +#define NVSP_INVALID_PROTOCOL_VERSION ((u32)0xFFFFFFFF) #define NVSP_PROTOCOL_VERSION_1 2 #define NVSP_MIN_PROTOCOL_VERSION NVSP_PROTOCOL_VERSION_1 @@ -84,7 +84,7 @@ typedef enum _NVSP_STATUS typedef struct _NVSP_MESSAGE_HEADER { - UINT32 MessageType; + u32 MessageType; } NVSP_MESSAGE_HEADER, *PNVSP_MESSAGE_HEADER; // @@ -99,8 +99,8 @@ typedef struct _NVSP_MESSAGE_HEADER // typedef struct _NVSP_MESSAGE_INIT { - UINT32 MinProtocolVersion; - UINT32 MaxProtocolVersion; + u32 MinProtocolVersion; + u32 MaxProtocolVersion; } NVSP_MESSAGE_INIT, *PNVSP_MESSAGE_INIT; // @@ -110,9 +110,9 @@ typedef struct _NVSP_MESSAGE_INIT // typedef struct _NVSP_MESSAGE_INIT_COMPLETE { - UINT32 NegotiatedProtocolVersion; - UINT32 MaximumMdlChainLength; - UINT32 Status; + u32 NegotiatedProtocolVersion; + u32 MaximumMdlChainLength; + u32 Status; } NVSP_MESSAGE_INIT_COMPLETE, *PNVSP_MESSAGE_INIT_COMPLETE; typedef union _NVSP_MESSAGE_INIT_UBER @@ -132,8 +132,8 @@ typedef union _NVSP_MESSAGE_INIT_UBER // typedef struct _NVSP_1_MESSAGE_SEND_NDIS_VERSION { - UINT32 NdisMajorVersion; - UINT32 NdisMinorVersion; + u32 NdisMajorVersion; + u32 NdisMinorVersion; } NVSP_1_MESSAGE_SEND_NDIS_VERSION, *PNVSP_1_MESSAGE_SEND_NDIS_VERSION; // @@ -149,10 +149,10 @@ typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION { - UINT32 Offset; - UINT32 SubAllocationSize; - UINT32 NumSubAllocations; - UINT32 EndOffset; + u32 Offset; + u32 SubAllocationSize; + u32 NumSubAllocations; + u32 EndOffset; } NVSP_1_RECEIVE_BUFFER_SECTION, *PNVSP_1_RECEIVE_BUFFER_SECTION; // @@ -162,8 +162,8 @@ typedef struct _NVSP_1_RECEIVE_BUFFER_SECTION // typedef struct _NVSP_1_MESSAGE_SEND_RECEIVE_BUFFER_COMPLETE { - UINT32 Status; - UINT32 NumSections; + u32 Status; + u32 NumSections; // // The receive buffer is split into two parts, a large @@ -213,7 +213,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER // typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE { - UINT32 Status; + u32 Status; // // The VSC gets to choose the size of the send buffer and @@ -221,7 +221,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE // This was done to enable dynamic reconfigurations when // the cost of GPA-direct buffers decreases. // - UINT32 SectionSize; + u32 SectionSize; } NVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE, *PNVSP_1_MESSAGE_SEND_SEND_BUFFER_COMPLETE; // @@ -246,7 +246,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET // the Network VSP only has one. Therefore, the channel // travels with the RNDIS packet. // - UINT32 ChannelType; + u32 ChannelType; // // This field is used to send part or all of the data @@ -256,8 +256,8 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET // and all of the data was sent through other VMBus // mechanisms. // - UINT32 SendBufferSectionIndex; - UINT32 SendBufferSectionSize; + u32 SendBufferSectionIndex; + u32 SendBufferSectionSize; } NVSP_1_MESSAGE_SEND_RNDIS_PACKET, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET; // @@ -268,7 +268,7 @@ typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET // typedef struct _NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE { - UINT32 Status; + u32 Status; } NVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE, *PNVSP_1_MESSAGE_SEND_RNDIS_PACKET_COMPLETE; typedef union _NVSP_MESSAGE_1_UBER diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h index 2036c6f56fb545848a8a04a941947858e9e0e7a4..eaba978920d0e154fa9d37bc25d7366a63b8495f 100644 --- a/drivers/staging/hv/include/osd.h +++ b/drivers/staging/hv/include/osd.h @@ -97,7 +97,6 @@ typedef struct _DLIST_ENTRY { // // unsigned types // -typedef unsigned int UINT32; #ifdef __x86_64__ typedef unsigned long UINT64; #else @@ -112,7 +111,6 @@ typedef unsigned char UCHAR; // // signed types // -typedef int INT32; #ifdef __x86_64__ typedef long INT64; #else @@ -131,7 +129,7 @@ typedef unsigned long SIZE_T; typedef unsigned char BOOL; typedef unsigned char BOOLEAN; typedef void* HANDLE; -typedef UINT32 DWORD; +typedef u32 DWORD; typedef char* PCHAR; typedef unsigned char BYTE; @@ -148,7 +146,7 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context); #ifdef __x86_64__ #define RDMSR(reg, v) { \ - UINT32 h, l; \ + u32 h, l; \ __asm__ __volatile__("rdmsr" \ : "=a" (l), "=d" (h) \ : "c" (reg)); \ @@ -156,9 +154,9 @@ typedef void (*PFN_TIMER_CALLBACK)(void* context); } #define WRMSR(reg, v) { \ - UINT32 h, l; \ - l = (UINT32)(((UINT64)(v)) & 0xFFFFFFFF); \ - h = (UINT32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \ + u32 h, l; \ + l = (u32)(((UINT64)(v)) & 0xFFFFFFFF); \ + h = (u32)((((UINT64)(v)) >> 32) & 0xFFFFFFFF); \ __asm__ __volatile__("wrmsr" \ : /* no outputs */ \ : "c" (reg), "a" (l), "d" (h)); \ @@ -219,7 +217,7 @@ extern void MemoryFence(void); extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context); extern void TimerClose(HANDLE hTimer); extern int TimerStop(HANDLE hTimer); -extern void TimerStart(HANDLE hTimer, UINT32 expirationInUs); +extern void TimerStart(HANDLE hTimer, u32 expirationInUs); extern SIZE_T GetTickCount(void); extern HANDLE WaitEventCreate(void); @@ -228,7 +226,7 @@ extern void WaitEventSet(HANDLE hWait); extern int WaitEventWait(HANDLE hWait); // If >0, hWait got signaled. If ==0, timeout. If < 0, error -extern int WaitEventWaitEx(HANDLE hWait, UINT32 TimeoutInMs); +extern int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs); extern HANDLE SpinlockCreate(void); extern void SpinlockClose(HANDLE hSpin); diff --git a/drivers/staging/hv/include/rndis.h b/drivers/staging/hv/include/rndis.h index 803e923ee3213ab0aa465966007baa9644dc7741..58d9a79e34add12f431d23785bca227d863b7629 100644 --- a/drivers/staging/hv/include/rndis.h +++ b/drivers/staging/hv/include/rndis.h @@ -28,21 +28,21 @@ // // Basic types // -typedef UINT32 RNDIS_REQUEST_ID; -typedef UINT32 RNDIS_HANDLE; -typedef UINT32 RNDIS_STATUS; -typedef UINT32 RNDIS_REQUEST_TYPE; -typedef UINT32 RNDIS_OID; -typedef UINT32 RNDIS_CLASS_ID; -typedef UINT32 RNDIS_MEDIUM; -typedef UINT32 *PRNDIS_REQUEST_ID; -typedef UINT32 *PRNDIS_HANDLE; -typedef UINT32 *PRNDIS_STATUS; -typedef UINT32 *PRNDIS_REQUEST_TYPE; -typedef UINT32 *PRNDIS_OID; -typedef UINT32 *PRNDIS_CLASS_ID; -typedef UINT32 *PRNDIS_MEDIUM; -typedef UINT32 RNDIS_AF; +typedef u32 RNDIS_REQUEST_ID; +typedef u32 RNDIS_HANDLE; +typedef u32 RNDIS_STATUS; +typedef u32 RNDIS_REQUEST_TYPE; +typedef u32 RNDIS_OID; +typedef u32 RNDIS_CLASS_ID; +typedef u32 RNDIS_MEDIUM; +typedef u32 *PRNDIS_REQUEST_ID; +typedef u32 *PRNDIS_HANDLE; +typedef u32 *PRNDIS_STATUS; +typedef u32 *PRNDIS_REQUEST_TYPE; +typedef u32 *PRNDIS_OID; +typedef u32 *PRNDIS_CLASS_ID; +typedef u32 *PRNDIS_MEDIUM; +typedef u32 RNDIS_AF; // // Status codes @@ -369,9 +369,9 @@ typedef UINT32 RNDIS_AF; typedef struct _RNDIS_INITIALIZE_REQUEST { RNDIS_REQUEST_ID RequestId; - UINT32 MajorVersion; - UINT32 MinorVersion; - UINT32 MaxTransferSize; + u32 MajorVersion; + u32 MinorVersion; + u32 MaxTransferSize; } RNDIS_INITIALIZE_REQUEST, *PRNDIS_INITIALIZE_REQUEST; @@ -382,15 +382,15 @@ typedef struct _RNDIS_INITIALIZE_COMPLETE { RNDIS_REQUEST_ID RequestId; RNDIS_STATUS Status; - UINT32 MajorVersion; - UINT32 MinorVersion; - UINT32 DeviceFlags; + u32 MajorVersion; + u32 MinorVersion; + u32 DeviceFlags; RNDIS_MEDIUM Medium; - UINT32 MaxPacketsPerMessage; - UINT32 MaxTransferSize; - UINT32 PacketAlignmentFactor; - UINT32 AFListOffset; - UINT32 AFListSize; + u32 MaxPacketsPerMessage; + u32 MaxTransferSize; + u32 PacketAlignmentFactor; + u32 AFListOffset; + u32 AFListSize; } RNDIS_INITIALIZE_COMPLETE, *PRNDIS_INITIALIZE_COMPLETE; @@ -401,8 +401,8 @@ typedef struct _RNDIS_INITIALIZE_COMPLETE typedef struct _RNDIS_CO_ADDRESS_FAMILY { RNDIS_AF AddressFamily; - UINT32 MajorVersion; - UINT32 MinorVersion; + u32 MajorVersion; + u32 MinorVersion; } RNDIS_CO_ADDRESS_FAMILY, *PRNDIS_CO_ADDRESS_FAMILY; @@ -422,8 +422,8 @@ typedef struct _RNDIS_QUERY_REQUEST { RNDIS_REQUEST_ID RequestId; RNDIS_OID Oid; - UINT32 InformationBufferLength; - UINT32 InformationBufferOffset; + u32 InformationBufferLength; + u32 InformationBufferOffset; RNDIS_HANDLE DeviceVcHandle; } RNDIS_QUERY_REQUEST, *PRNDIS_QUERY_REQUEST; @@ -435,8 +435,8 @@ typedef struct _RNDIS_QUERY_COMPLETE { RNDIS_REQUEST_ID RequestId; RNDIS_STATUS Status; - UINT32 InformationBufferLength; - UINT32 InformationBufferOffset; + u32 InformationBufferLength; + u32 InformationBufferOffset; } RNDIS_QUERY_COMPLETE, *PRNDIS_QUERY_COMPLETE; @@ -447,8 +447,8 @@ typedef struct _RNDIS_SET_REQUEST { RNDIS_REQUEST_ID RequestId; RNDIS_OID Oid; - UINT32 InformationBufferLength; - UINT32 InformationBufferOffset; + u32 InformationBufferLength; + u32 InformationBufferOffset; RNDIS_HANDLE DeviceVcHandle; } RNDIS_SET_REQUEST, *PRNDIS_SET_REQUEST; @@ -468,7 +468,7 @@ typedef struct _RNDIS_SET_COMPLETE // typedef struct _RNDIS_RESET_REQUEST { - UINT32 Reserved; + u32 Reserved; } RNDIS_RESET_REQUEST, *PRNDIS_RESET_REQUEST; // @@ -477,7 +477,7 @@ typedef struct _RNDIS_RESET_REQUEST typedef struct _RNDIS_RESET_COMPLETE { RNDIS_STATUS Status; - UINT32 AddressingReset; + u32 AddressingReset; } RNDIS_RESET_COMPLETE, *PRNDIS_RESET_COMPLETE; @@ -487,8 +487,8 @@ typedef struct _RNDIS_RESET_COMPLETE typedef struct _RNDIS_INDICATE_STATUS { RNDIS_STATUS Status; - UINT32 StatusBufferLength; - UINT32 StatusBufferOffset; + u32 StatusBufferLength; + u32 StatusBufferOffset; } RNDIS_INDICATE_STATUS, *PRNDIS_INDICATE_STATUS; @@ -499,7 +499,7 @@ typedef struct _RNDIS_INDICATE_STATUS typedef struct _RNDIS_DIAGNOSTIC_INFO { RNDIS_STATUS DiagStatus; - UINT32 ErrorOffset; + u32 ErrorOffset; } RNDIS_DIAGNOSTIC_INFO, *PRNDIS_DIAGNOSTIC_INFO; @@ -531,15 +531,15 @@ typedef struct _RNDIS_KEEPALIVE_COMPLETE // typedef struct _RNDIS_PACKET { - UINT32 DataOffset; - UINT32 DataLength; - UINT32 OOBDataOffset; - UINT32 OOBDataLength; - UINT32 NumOOBDataElements; - UINT32 PerPacketInfoOffset; - UINT32 PerPacketInfoLength; + u32 DataOffset; + u32 DataLength; + u32 OOBDataOffset; + u32 OOBDataLength; + u32 NumOOBDataElements; + u32 PerPacketInfoOffset; + u32 PerPacketInfoLength; RNDIS_HANDLE VcHandle; - UINT32 Reserved; + u32 Reserved; } RNDIS_PACKET, *PRNDIS_PACKET; // @@ -547,9 +547,9 @@ typedef struct _RNDIS_PACKET // typedef struct _RNDIS_OOBD { - UINT32 Size; + u32 Size; RNDIS_CLASS_ID Type; - UINT32 ClassInformationOffset; + u32 ClassInformationOffset; } RNDIS_OOBD, *PRNDIS_OOBD; // @@ -557,9 +557,9 @@ typedef struct _RNDIS_OOBD // typedef struct _RNDIS_PER_PACKET_INFO { - UINT32 Size; - UINT32 Type; - UINT32 PerPacketInformationOffset; + u32 Size; + u32 Type; + u32 PerPacketInformationOffset; } RNDIS_PER_PACKET_INFO, *PRNDIS_PER_PACKET_INFO; @@ -569,11 +569,11 @@ typedef struct _RNDIS_PER_PACKET_INFO // typedef struct _RNDIS_CONFIG_PARAMETER_INFO { - UINT32 ParameterNameOffset; - UINT32 ParameterNameLength; - UINT32 ParameterType; - UINT32 ParameterValueOffset; - UINT32 ParameterValueLength; + u32 ParameterNameOffset; + u32 ParameterNameLength; + u32 ParameterType; + u32 ParameterValueOffset; + u32 ParameterValueLength; } RNDIS_CONFIG_PARAMETER_INFO, *PRNDIS_CONFIG_PARAMETER_INFO; // @@ -636,8 +636,8 @@ typedef struct _RCONDIS_MP_QUERY_REQUEST RNDIS_REQUEST_TYPE RequestType; RNDIS_OID Oid; RNDIS_HANDLE DeviceVcHandle; - UINT32 InformationBufferLength; - UINT32 InformationBufferOffset; + u32 InformationBufferLength; + u32 InformationBufferOffset; } RCONDIS_MP_QUERY_REQUEST, *PRCONDIS_MP_QUERY_REQUEST; @@ -650,8 +650,8 @@ typedef struct _RCONDIS_MP_SET_REQUEST RNDIS_REQUEST_TYPE RequestType; RNDIS_OID Oid; RNDIS_HANDLE DeviceVcHandle; - UINT32 InformationBufferLength; - UINT32 InformationBufferOffset; + u32 InformationBufferLength; + u32 InformationBufferOffset; } RCONDIS_MP_SET_REQUEST, *PRCONDIS_MP_SET_REQUEST; @@ -662,8 +662,8 @@ typedef struct _RCONDIS_INDICATE_STATUS { RNDIS_HANDLE NdisVcHandle; RNDIS_STATUS Status; - UINT32 StatusBufferLength; - UINT32 StatusBufferOffset; + u32 StatusBufferLength; + u32 StatusBufferOffset; } RCONDIS_INDICATE_STATUS, *PRCONDIS_INDICATE_STATUS; @@ -673,30 +673,30 @@ typedef struct _RCONDIS_INDICATE_STATUS typedef struct _RCONDIS_SPECIFIC_PARAMETERS { - UINT32 ParameterType; - UINT32 ParameterLength; - UINT32 ParameterOffset; + u32 ParameterType; + u32 ParameterLength; + u32 ParameterOffset; } RCONDIS_SPECIFIC_PARAMETERS, *PRCONDIS_SPECIFIC_PARAMETERS; typedef struct _RCONDIS_MEDIA_PARAMETERS { - UINT32 Flags; - UINT32 Reserved1; - UINT32 Reserved2; + u32 Flags; + u32 Reserved1; + u32 Reserved2; RCONDIS_SPECIFIC_PARAMETERS MediaSpecific; } RCONDIS_MEDIA_PARAMETERS, *PRCONDIS_MEDIA_PARAMETERS; typedef struct _RNDIS_FLOWSPEC { - UINT32 TokenRate; - UINT32 TokenBucketSize; - UINT32 PeakBandwidth; - UINT32 Latency; - UINT32 DelayVariation; - UINT32 ServiceType; - UINT32 MaxSduSize; - UINT32 MinimumPolicedSize; + u32 TokenRate; + u32 TokenBucketSize; + u32 PeakBandwidth; + u32 Latency; + u32 DelayVariation; + u32 ServiceType; + u32 MaxSduSize; + u32 MinimumPolicedSize; } RNDIS_FLOWSPEC, *PRNDIS_FLOWSPEC; typedef struct _RCONDIS_CALL_MANAGER_PARAMETERS @@ -712,12 +712,12 @@ typedef struct _RCONDIS_CALL_MANAGER_PARAMETERS typedef struct _RCONDIS_MP_ACTIVATE_VC_REQUEST { RNDIS_REQUEST_ID RequestId; - UINT32 Flags; + u32 Flags; RNDIS_HANDLE DeviceVcHandle; - UINT32 MediaParamsOffset; - UINT32 MediaParamsLength; - UINT32 CallMgrParamsOffset; - UINT32 CallMgrParamsLength; + u32 MediaParamsOffset; + u32 MediaParamsLength; + u32 CallMgrParamsOffset; + u32 CallMgrParamsLength; } RCONDIS_MP_ACTIVATE_VC_REQUEST, *PRCONDIS_MP_ACTIVATE_VC_REQUEST; // @@ -736,7 +736,7 @@ typedef struct _RCONDIS_MP_ACTIVATE_VC_COMPLETE typedef struct _RCONDIS_MP_DEACTIVATE_VC_REQUEST { RNDIS_REQUEST_ID RequestId; - UINT32 Flags; + u32 Flags; RNDIS_HANDLE DeviceVcHandle; } RCONDIS_MP_DEACTIVATE_VC_REQUEST, *PRCONDIS_MP_DEACTIVATE_VC_REQUEST; @@ -786,13 +786,13 @@ typedef union _RNDIS_MESSAGE_CONTAINER // typedef __struct_bcount(MessageLength) struct _RNDIS_MESSAGE { - UINT32 NdisMessageType; + u32 NdisMessageType; // // Total length of this message, from the beginning // of the RNDIS_MESSAGE struct, in bytes. // - UINT32 MessageLength; + u32 MessageLength; // Actual message RNDIS_MESSAGE_CONTAINER Message; diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c index cf8091308d926a7497774788c2b3dad86f829037..c178f180ab278ca90bf87b6edc001c3c8da3af06 100644 --- a/drivers/staging/hv/osd.c +++ b/drivers/staging/hv/osd.c @@ -289,7 +289,7 @@ HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context) return t; } -void TimerStart(HANDLE hTimer, UINT32 expirationInUs) +void TimerStart(HANDLE hTimer, u32 expirationInUs) { TIMER* t = (TIMER* )hTimer; @@ -363,7 +363,7 @@ int WaitEventWait(HANDLE hWait) return ret; } -int WaitEventWaitEx(HANDLE hWait, UINT32 TimeoutInMs) +int WaitEventWaitEx(HANDLE hWait, u32 TimeoutInMs) { int ret=0; WAITEVENT* waitEvent = (WAITEVENT* )hWait;