win-pvdrivers

changeset 400:8f94eeae17f9

mis-generated w32api.diff, fix the patch
author Andy Grover <andy.grover@oracle.com>
date Thu Jul 17 23:11:18 2008 -0700 (2008-07-17)
parents c61ee22db820
children 04883e1dc65c
files mingw/w32api.diff
line diff
     1.1 --- a/mingw/w32api.diff	Thu Jul 17 10:33:56 2008 -0700
     1.2 +++ b/mingw/w32api.diff	Thu Jul 17 23:11:18 2008 -0700
     1.3 @@ -1,7 +1,7 @@
     1.4 -diff -r 8a2d0356d23d include/ddk/ndis.h
     1.5 ---- a/include/ddk/ndis.h	Wed Jul 09 12:54:30 2008 -0700
     1.6 -+++ b/include/ddk/ndis.h	Wed Jul 09 12:54:42 2008 -0700
     1.7 -@@ -52,12 +52,16 @@ extern "C" {
     1.8 +diff -r 0717ca718d88 include/ddk/ndis.h
     1.9 +--- a/include/ddk/ndis.h	Tue Jul 08 21:35:58 2008 -0700
    1.10 ++++ b/include/ddk/ndis.h	Thu Jul 17 23:09:31 2008 -0700
    1.11 +@@ -52,12 +52,16 @@
    1.12   #if defined(NDIS50_MINIPORT)
    1.13   #ifndef NDIS50
    1.14   #define NDIS50
    1.15 @@ -18,7 +18,7 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
    1.16   #endif
    1.17   #endif /* NDIS51_MINIPORT */
    1.18   
    1.19 -@@ -399,19 +403,19 @@ typedef struct _NDIS_PACKET_PRIVATE {
    1.20 +@@ -399,19 +403,19 @@
    1.21   
    1.22   typedef struct _NDIS_PACKET {
    1.23     NDIS_PACKET_PRIVATE  Private;
    1.24 @@ -46,21 +46,19 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
    1.25     ULONG_PTR  Reserved[2];
    1.26     UCHAR  ProtocolReserved[1];
    1.27   } NDIS_PACKET, *PNDIS_PACKET, **PPNDIS_PACKET;
    1.28 -@@ -642,6 +646,13 @@ typedef enum _NDIS_PNP_DEVICE_STATE {
    1.29 +@@ -642,6 +646,11 @@
    1.30   #define NDIS_DEVICE_DISABLE_WAKE_ON_MAGIC_PACKET  0x00000080
    1.31   #define NDIS_DEVICE_DISABLE_WAKE_ON_PATTERN_MATCH 0x00000100
    1.32   
    1.33 ++/* _NDIS_DEVICE_PNP_EVENT */
    1.34  +typedef enum _NDIS_DEVICE_PNP_EVENT
    1.35  +{
    1.36 -+  /* couldn't find public docs on other values */
    1.37 -+  NdisDevicePnpEventSurpriseRemoved=2,
    1.38 -+  NdisDevicePnpEventPowerProfileChanged=5
    1.39 ++  Unused
    1.40  +} NDIS_DEVICE_PNP_EVENT;
    1.41 -+
    1.42   
    1.43   /* OID_GEN_NETWORK_LAYER_ADDRESSES */
    1.44   typedef struct _NETWORK_ADDRESS {
    1.45 -@@ -915,6 +926,33 @@ typedef struct _NDIS_TASK_IPSEC {
    1.46 +@@ -915,6 +924,33 @@
    1.47     } V4ESP;
    1.48   } NDIS_TASK_IPSEC, *PNDIS_TASK_IPSEC;
    1.49   
    1.50 @@ -94,7 +92,7 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
    1.51   typedef struct _NDIS_TASK_OFFLOAD {
    1.52     ULONG  Version;
    1.53     ULONG  Size;
    1.54 -@@ -926,24 +964,6 @@ typedef struct _NDIS_TASK_OFFLOAD {
    1.55 +@@ -926,24 +962,6 @@
    1.56   
    1.57   /* NDIS_TASK_OFFLOAD_HEADER.Version constants */
    1.58   #define NDIS_TASK_OFFLOAD_VERSION 1
    1.59 @@ -119,7 +117,7 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
    1.60   
    1.61   typedef struct _NDIS_TASK_TCP_IP_CHECKSUM {
    1.62     struct {
    1.63 -@@ -1542,6 +1562,8 @@ NdisAllocatePacketPool(
    1.64 +@@ -1542,6 +1560,8 @@
    1.65     /*OUT*/ PNDIS_HANDLE  PoolHandle,
    1.66     /*IN*/ UINT  NumberOfDescriptors,
    1.67     /*IN*/ UINT  ProtocolReservedLength);
    1.68 @@ -128,7 +126,7 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
    1.69   
    1.70   NDISAPI
    1.71   VOID
    1.72 -@@ -1756,6 +1778,46 @@ NdisFreeBuffer(
    1.73 +@@ -1756,6 +1776,46 @@
    1.74   
    1.75   /*
    1.76    * VOID
    1.77 @@ -175,7 +173,7 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
    1.78    * NdisQueryBuffer(
    1.79    * IN PNDIS_BUFFER  Buffer,
    1.80    * OUT PVOID  *VirtualAddress OPTIONAL,
    1.81 -@@ -2092,7 +2154,7 @@ NdisFreeBuffer(
    1.82 +@@ -2092,7 +2152,7 @@
    1.83    * NdisReinitializePacket(
    1.84    * IN OUT  PNDIS_PACKET  Packet);
    1.85    */
    1.86 @@ -184,7 +182,7 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
    1.87   {                                               \
    1.88   	(Packet)->Private.Head = (PNDIS_BUFFER)NULL;  \
    1.89   	(Packet)->Private.ValidCounts = FALSE;        \
    1.90 -@@ -2967,6 +3029,11 @@ NdisMWanIndicateReceive(
    1.91 +@@ -2967,6 +3027,11 @@
    1.92     /*IN*/ PUCHAR  PacketBuffer,
    1.93     /*IN*/ UINT  PacketSize);
    1.94   
    1.95 @@ -196,7 +194,7 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
    1.96   NDISAPI
    1.97   VOID
    1.98   DDKAPI
    1.99 -@@ -3155,6 +3222,13 @@ DDKAPI
   1.100 +@@ -3155,6 +3220,13 @@
   1.101   DDKAPI
   1.102   NdisPacketPoolUsage(
   1.103     /*IN*/ NDIS_HANDLE  PoolHandle);
   1.104 @@ -210,7 +208,7 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
   1.105   
   1.106   NDISAPI
   1.107   NDIS_STATUS
   1.108 -@@ -4517,6 +4591,29 @@ struct _NDIS_OPEN_BLOCK
   1.109 +@@ -4517,6 +4589,29 @@
   1.110   
   1.111   /* Routines for NDIS miniport drivers */
   1.112   
   1.113 @@ -240,27 +238,22 @@ diff -r 8a2d0356d23d include/ddk/ndis.h
   1.114   NDISAPI
   1.115   VOID
   1.116   DDKAPI
   1.117 -diff -r 8a2d0356d23d include/ddk/ntddndis.h
   1.118 ---- a/include/ddk/ntddndis.h	Wed Jul 09 12:54:30 2008 -0700
   1.119 -+++ b/include/ddk/ntddndis.h	Wed Jul 09 12:54:42 2008 -0700
   1.120 -@@ -179,6 +179,13 @@ typedef struct _NDIS_PNP_CAPABILITIES {
   1.121 - #define NDIS_MINIPORT_SUPPORTS_CANCEL_SEND_PACKETS    0x00800000
   1.122 - #define NDIS_MINIPORT_64BITS_DMA                      0x01000000
   1.123 +diff -r 0717ca718d88 include/ddk/ntddndis.h
   1.124 +--- a/include/ddk/ntddndis.h	Tue Jul 08 21:35:58 2008 -0700
   1.125 ++++ b/include/ddk/ntddndis.h	Thu Jul 17 23:09:31 2008 -0700
   1.126 +@@ -152,6 +152,8 @@
   1.127 + #define OID_802_3_XMIT_TIMES_CRS_LOST     0x01020206
   1.128 + #define OID_802_3_XMIT_LATE_COLLISIONS    0x01020207
   1.129   
   1.130 -+/* TCP offload OIDs */
   1.131 -+#define OID_TCP_TASK_OFFLOAD                0xFC010201
   1.132 -+#define OID_TCP_TASK_IPSEC_ADD_SA           0xFC010202
   1.133 -+#define OID_TCP_TASK_IPSEC_ADD_UDPESP_SA    0xFC010203
   1.134 -+#define OID_TCP_TASK_IPSEC_DELETE_SA        0xFC010204
   1.135 -+#define OID_TCP_TASK_IPSEC_DELETE_UDPESP_SA 0xFC010205
   1.136 ++#define OID_TCP_TASK_OFFLOAD              0xFC010201
   1.137  +
   1.138 - #pragma pack(pop)
   1.139 - 
   1.140 - #ifdef __cplusplus
   1.141 -diff -r 8a2d0356d23d include/ddk/scsi.h
   1.142 ---- a/include/ddk/scsi.h	Wed Jul 09 12:54:30 2008 -0700
   1.143 -+++ b/include/ddk/scsi.h	Wed Jul 09 12:54:42 2008 -0700
   1.144 -@@ -1272,6 +1272,13 @@ typedef struct _SENSE_DATA {
   1.145 + /* OID_GEN_MINIPORT_INFO constants */
   1.146 + #define NDIS_MINIPORT_BUS_MASTER                      0x00000001
   1.147 + #define NDIS_MINIPORT_WDM_DRIVER                      0x00000002
   1.148 +diff -r 0717ca718d88 include/ddk/scsi.h
   1.149 +--- a/include/ddk/scsi.h	Tue Jul 08 21:35:58 2008 -0700
   1.150 ++++ b/include/ddk/scsi.h	Thu Jul 17 23:09:31 2008 -0700
   1.151 +@@ -1272,6 +1272,13 @@
   1.152   #define IOCTL_SCSI_MINIPORT_NOT_QUORUM_CAPABLE  ((FILE_DEVICE_SCSI << 16) + 0x0520)
   1.153   #define IOCTL_SCSI_MINIPORT_NOT_CLUSTER_CAPABLE ((FILE_DEVICE_SCSI << 16) + 0x0521)
   1.154   
   1.155 @@ -274,21 +267,67 @@ diff -r 8a2d0356d23d include/ddk/scsi.h
   1.156   /* Read Capacity Data. Returned in Big Endian format */
   1.157   typedef struct _READ_CAPACITY_DATA {
   1.158     ULONG  LogicalBlockAddress;
   1.159 -diff -r 8a2d0356d23d include/ddk/winddk.h
   1.160 ---- a/include/ddk/winddk.h	Wed Jul 09 12:54:30 2008 -0700
   1.161 -+++ b/include/ddk/winddk.h	Wed Jul 09 12:54:42 2008 -0700
   1.162 -@@ -4896,6 +4896,10 @@ RtlStringFromGUID(
   1.163 +diff -r 0717ca718d88 include/ddk/winddk.h
   1.164 +--- a/include/ddk/winddk.h	Tue Jul 08 21:35:58 2008 -0700
   1.165 ++++ b/include/ddk/winddk.h	Thu Jul 17 23:09:31 2008 -0700
   1.166 +@@ -3828,7 +3828,7 @@
   1.167 +  *   VOID)
   1.168 +  */
   1.169 + #define KeGetCurrentProcessorNumber() \
   1.170 +-  ((ULONG)KeGetCurrentKPCR()->ProcessorNumber)
   1.171 ++  ((ULONG)KeGetCurrentKPCR()->Number)
   1.172 + 
   1.173 + 
   1.174 + #if  __USE_NTOSKRNL__
   1.175 +@@ -3842,13 +3842,13 @@
   1.176 + LONG
   1.177 + DDKFASTAPI
   1.178 + InterlockedIncrement(
   1.179 +-  /*IN*/ PLONG  VOLATILE  Addend);
   1.180 ++  /*IN*/ LONG VOLATILE *Addend);
   1.181 + 
   1.182 + NTOSAPI
   1.183 + LONG
   1.184 + DDKFASTAPI
   1.185 + InterlockedDecrement(
   1.186 +-  /*IN*/ PLONG  VOLATILE  Addend);
   1.187 ++  /*IN*/ LONG VOLATILE *Addend);
   1.188 + 
   1.189 + NTOSAPI
   1.190 + LONG
   1.191 +@@ -4895,6 +4895,10 @@
   1.192 + RtlStringFromGUID( 
   1.193     /*IN*/ REFGUID  Guid, 
   1.194     /*OUT*/ PUNICODE_STRING  GuidString);
   1.195 - 
   1.196 ++
   1.197  +#define RtlStringCbCopyA(dst, dst_len, src) strncpy(dst, src, dst_len)
   1.198  +#define RtlStringCbPrintfA(args...) snprintf(args)
   1.199  +#define RtlStringCbVPrintfA(args...) vsnprintf(args)
   1.200 -+
   1.201 + 
   1.202   NTOSAPI
   1.203   BOOLEAN
   1.204 +@@ -7350,6 +7354,11 @@
   1.205 + #define KeFlushIoBuffers(_Mdl, _ReadOperation, _DmaOperation)
   1.206 + 
   1.207 + NTOSAPI
   1.208 ++VOID
   1.209 ++DDKAPI
   1.210 ++KeFlushQueuedDpcs(VOID);
   1.211 ++
   1.212 ++NTOSAPI
   1.213 + PRKTHREAD
   1.214   DDKAPI
   1.215 -@@ -7726,38 +7730,18 @@ KeWaitForSingleObject(
   1.216 + KeGetCurrentThread(
   1.217 +@@ -7448,6 +7457,8 @@
   1.218 + DDKAPI
   1.219 + KeLeaveCriticalRegion(
   1.220 +   VOID);
   1.221 ++
   1.222 ++#define KeMemoryBarrier() asm("mfence;")
   1.223 + 
   1.224 + NTOSAPI
   1.225 + NTSTATUS
   1.226 +@@ -7719,38 +7730,18 @@
   1.227     /*IN*/ BOOLEAN  Alertable,
   1.228     /*IN*/ PLARGE_INTEGER  Timeout  /*OPTIONAL*/);
   1.229   
   1.230 @@ -334,10 +373,10 @@ diff -r 8a2d0356d23d include/ddk/winddk.
   1.231   
   1.232   NTOSAPI
   1.233   KIRQL
   1.234 -diff -r 8a2d0356d23d lib/ddk/ndis.def
   1.235 ---- a/lib/ddk/ndis.def	Wed Jul 09 12:54:30 2008 -0700
   1.236 -+++ b/lib/ddk/ndis.def	Wed Jul 09 12:54:42 2008 -0700
   1.237 -@@ -130,8 +130,8 @@ NdisImmediateReadSharedMemory@16
   1.238 +diff -r 0717ca718d88 lib/ddk/ndis.def
   1.239 +--- a/lib/ddk/ndis.def	Tue Jul 08 21:35:58 2008 -0700
   1.240 ++++ b/lib/ddk/ndis.def	Thu Jul 17 23:09:31 2008 -0700
   1.241 +@@ -130,8 +130,8 @@
   1.242   ;NdisImmediateWritePortUlong
   1.243   ;NdisImmediateWritePortUshort
   1.244   NdisImmediateWriteSharedMemory@16
   1.245 @@ -348,7 +387,7 @@ diff -r 8a2d0356d23d lib/ddk/ndis.def
   1.246   ;NdisInitializeEvent
   1.247   NdisInitializeReadWriteLock@4
   1.248   ;NdisInitializeString
   1.249 -@@ -149,7 +149,7 @@ NdisMAllocateMapRegisters@20
   1.250 +@@ -149,7 +149,7 @@
   1.251   NdisMAllocateMapRegisters@20
   1.252   NdisMAllocateSharedMemory@20
   1.253   NdisMAllocateSharedMemoryAsync@16
   1.254 @@ -357,7 +396,7 @@ diff -r 8a2d0356d23d lib/ddk/ndis.def
   1.255   NdisMCloseLog@4
   1.256   NdisMCmActivateVc@8
   1.257   NdisMCmCreateVc@16
   1.258 -@@ -179,7 +179,7 @@ NdisMGetDeviceProperty@24
   1.259 +@@ -179,7 +179,7 @@
   1.260   ;NdisMIndicateStatus
   1.261   ;NdisMIndicateStatusComplete
   1.262   NdisMInitializeScatterGatherDma@12
   1.263 @@ -366,7 +405,7 @@ diff -r 8a2d0356d23d lib/ddk/ndis.def
   1.264   NdisMMapIoSpace@20
   1.265   ;NdisMPciAssignResources
   1.266   NdisMPromoteMiniport@4
   1.267 -@@ -202,7 +202,7 @@ NdisMSetAttributesEx@20
   1.268 +@@ -202,7 +202,7 @@
   1.269   NdisMSetAttributesEx@20
   1.270   ;NdisMSetInformationComplete
   1.271   NdisMSetMiniportSecondary@8
   1.272 @@ -375,7 +414,7 @@ diff -r 8a2d0356d23d lib/ddk/ndis.def
   1.273   ;NdisMSetTimer
   1.274   NdisMSleep@4
   1.275   ;NdisMStartBufferPhysicalMapping
   1.276 -@@ -252,7 +252,7 @@ NdisSendPackets@12
   1.277 +@@ -252,7 +252,7 @@
   1.278   NdisSendPackets@12
   1.279   ;NdisSetEvent
   1.280   ;NdisSetPacketCancelId
   1.281 @@ -384,10 +423,30 @@ diff -r 8a2d0356d23d lib/ddk/ndis.def
   1.282   ;NdisSetPacketStatus
   1.283   ;NdisSetProtocolFilter
   1.284   ;NdisSetTimer
   1.285 -diff -r 8a2d0356d23d lib/ddk/scsiport.def
   1.286 ---- a/lib/ddk/scsiport.def	Wed Jul 09 12:54:30 2008 -0700
   1.287 -+++ b/lib/ddk/scsiport.def	Wed Jul 09 12:54:42 2008 -0700
   1.288 -@@ -8,7 +8,7 @@ ScsiPortFlushDma@4
   1.289 +diff -r 0717ca718d88 lib/ddk/ntoskrnl.def
   1.290 +--- a/lib/ddk/ntoskrnl.def	Tue Jul 08 21:35:58 2008 -0700
   1.291 ++++ b/lib/ddk/ntoskrnl.def	Thu Jul 17 23:09:31 2008 -0700
   1.292 +@@ -506,6 +506,7 @@
   1.293 + ;KeFindConfigurationEntry
   1.294 + ;KeFindConfigurationNextEntry
   1.295 + ;KeFlushEntireTb
   1.296 ++KeFlushQueuedDpcs@0
   1.297 + KeGetCurrentThread@0
   1.298 + KeGetPreviousMode@0
   1.299 + KeGetRecommendedSharedDataAlignment@0
   1.300 +@@ -542,7 +543,7 @@
   1.301 + ;KeIsExecutingDpc
   1.302 + KeLeaveCriticalRegion@0
   1.303 + ;KeLoaderBlock DATA
   1.304 +-;KeNumberProcessors DATA
   1.305 ++KeNumberProcessors DATA
   1.306 + ;KeProfileInterrupt
   1.307 + ;KeProfileInterruptWithSource
   1.308 + KePulseEvent@12
   1.309 +diff -r 0717ca718d88 lib/ddk/scsiport.def
   1.310 +--- a/lib/ddk/scsiport.def	Tue Jul 08 21:35:58 2008 -0700
   1.311 ++++ b/lib/ddk/scsiport.def	Thu Jul 17 23:09:31 2008 -0700
   1.312 +@@ -8,7 +8,7 @@
   1.313   ScsiPortFlushDma@4
   1.314   ScsiPortFreeDeviceBase@8
   1.315   ScsiPortGetBusData@24