Merge from amd64-branch:
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 25 Mar 2010 03:50:46 +0000 (03:50 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 25 Mar 2010 03:50:46 +0000 (03:50 +0000)
36380 (tkreuzer)
[SCSIPORT]
Implement some functions that are forwarded to HAL on x86 build, but not on x64. Modify spec file (use preprocessor macro).

36397 (tkreuzer)
[SCSIPORT]
rename .spec to .pspec

36949 (sginsberg)
- Fix NTFS FSD compilation

36951 (sginsgerb)
[NE2000]
- Fix ne2000 compilation (treat pointer size as ULONG_PTR, correct function prototypes)

36958 (sginsberg)
[ISAPNP]
- Fix isapnp compilation for 64-bit

36961 (sginsberg)
[SERIAL]
- Make serial build for 64 bit -- explicitly cast first parameter to InterlockedCompareExchangePointer
to PVOID

36964 (sginsberg)
- Fix DXG 64-bit compilation

36972 (sserapion)
[VGA]
- When doing pointer arithmetic, ULONG_PTR is your friend

37234 (tkreuzer)
[SCSIPORT]
Fix scsiport, by using pspec again.

40927 (tkreuzer)
[BMFD]
HGLYPH is an ULONG. Use offset to glyph entry as HGLYPH instead of the pointer to fix 64bit build.

41070 (tkreuzer)
[TCPIP]
fix a pointer to ULONG cast

41500 (tkreuzer)
[NDIS]
Pass ULONG* to MiniQueryInformation for the number of written bytes instead of ULONG_PTR*

41502 (tkreuzer)
[WDMAUD]
Make DeviceIndex a ULONG_PTR

44339 (sserapion)
[NDIS]
Fix ndis build.

svn path=/trunk/; revision=46424

reactos/drivers/bus/isapnp/isapnp.c
reactos/drivers/directx/dxg/ddhmg.c
reactos/drivers/filesystems/ntfs/attrib.c
reactos/drivers/network/dd/ne2000/include/ne2000.h
reactos/drivers/network/dd/ne2000/ne2000/8390.c
reactos/drivers/serial/serial/devctrl.c
reactos/drivers/storage/scsiport/scsiport.pspec [new file with mode: 0644]
reactos/drivers/storage/scsiport/scsiport.rbuild
reactos/drivers/storage/scsiport/scsiport.spec [deleted file]
reactos/drivers/storage/scsiport/stubs.c [new file with mode: 0644]
reactos/drivers/video/displays/vga/main/enable.c

index 2c27302..37262c3 100644 (file)
@@ -153,7 +153,7 @@ static VOID WriteUlong(UCHAR Index, ULONG Value)
 }
 #endif
 
-static __inline VOID SetReadDataPort(ULONG Port)
+static __inline VOID SetReadDataPort(ULONG_PTR Port)
 {
   IsaPnPReadPort = (PUCHAR)Port;
        WriteUchar(0x00, (UCHAR) (Port >> 2));
@@ -214,13 +214,13 @@ static VOID DeactivateLogicalDevice(UCHAR LogicalDevice)
 
 #define READ_DATA_PORT_STEP 32  /* Minimum is 4 */
 
-static ULONG FindNextReadPort(VOID)
+static ULONG_PTR FindNextReadPort(VOID)
 {
-       ULONG Port;
+       ULONG_PTR Port;
 
 
 
-       Port = (ULONG)IsaPnPReadPort;
+       Port = (ULONG_PTR)IsaPnPReadPort;
 
        while (TRUE) {
 
@@ -260,7 +260,7 @@ static ULONG FindNextReadPort(VOID)
 
 static BOOLEAN IsolateReadDataPortSelect(VOID)
 {
-  ULONG Port;
+  ULONG_PTR Port;
 
        SendWait();
        SendKey();
@@ -333,7 +333,7 @@ static ULONG IsolatePnPCards(VOID)
                        KeStallExecutionProcessor(250);
                        iteration++;
                        SendWake(0x00);
-                       SetReadDataPort((ULONG)IsaPnPReadPort);
+                       SetReadDataPort((ULONG_PTR)IsaPnPReadPort);
                        KeStallExecutionProcessor(1000);
                        WriteAddress(0x01);
                        KeStallExecutionProcessor(1000);
@@ -1304,7 +1304,7 @@ static NTSTATUS BuildResourceLists(PISAPNP_LOGICAL_DEVICE LogicalDevice)
   do {
     Status = BuildResourceList(LogicalDevice, p, Priority);
     if (NT_SUCCESS(Status)) {
-      p = (PIO_RESOURCE_LIST)((ULONG)p + SingleListSize);
+      p = (PIO_RESOURCE_LIST)((ULONG_PTR)p + SingleListSize);
       Priority++;
     }
   } while (Status != STATUS_NOT_FOUND);
@@ -1476,7 +1476,7 @@ ISAPNPQueryBusRelations(
     CurrentEntry = CurrentEntry->Flink;
   }
 
-  Irp->IoStatus.Information = (ULONG)Relations;
+  Irp->IoStatus.Information = (ULONG_PTR)Relations;
 
   return Status;
 }
index 39e0721..caa5caf 100644 (file)
@@ -24,7 +24,7 @@ BOOL
 FASTCALL
 VerifyObjectOwner(PDD_ENTRY pEntry)
 {
-    DWORD Pid = (DWORD) PsGetCurrentProcessId() & 0xFFFFFFFC;
+    DWORD Pid = (DWORD)(DWORD_PTR)PsGetCurrentProcessId() & 0xFFFFFFFC;
     DWORD check = pEntry->ObjectOwner.ulObj & 0xFFFFFFFE;
     return ( (check == Pid) || (!check));
 }
@@ -145,7 +145,7 @@ FASTCALL
 DdHmgLock(HANDLE DdHandle, UCHAR ObjectType, BOOLEAN LockOwned)
 {
 
-    DWORD Index = (DWORD)DdHandle & 0x1FFFFF;
+    DWORD Index = (DWORD)(DWORD_PTR)DdHandle & 0x1FFFFF;
     PDD_ENTRY pEntry = NULL;
     PVOID Object = NULL;
 
index 95a5af6..e334ba9 100644 (file)
@@ -88,7 +88,7 @@ FindRun (PNONRESIDENT_ATTRIBUTE NresAttr,
 
   *lcn = 0;
 
-  for (run = (PUCHAR)((ULONG)NresAttr + NresAttr->RunArrayOffset);
+  for (run = (PUCHAR)((ULONG_PTR)NresAttr + NresAttr->RunArrayOffset);
        *run != 0; run += RunLength(run))
     {
       *lcn += RunLCN(run);
@@ -248,7 +248,7 @@ NtfsDumpAttribute (PATTRIBUTE Attribute)
     {
       Name.Length = Attribute->NameLength * sizeof(WCHAR);
       Name.MaximumLength = Name.Length;
-      Name.Buffer = (PWCHAR)((ULONG)Attribute + Attribute->NameOffset);
+      Name.Buffer = (PWCHAR)((ULONG_PTR)Attribute + Attribute->NameOffset);
 
       DbgPrint("'%wZ' ", &Name);
     }
index 0785c41..4c4e28b 100644 (file)
@@ -80,7 +80,7 @@ typedef struct _NIC_ADAPTER
     NDIS_MINIPORT_INTERRUPT Interrupt;
 
     /* I/O base address and interrupt number of adapter */
-    ULONG IoBaseAddress;
+    ULONG_PTR IoBaseAddress;
     ULONG InterruptLevel;
     ULONG InterruptVector;
     BOOLEAN InterruptShared;
@@ -222,24 +222,24 @@ VOID NICUpdateCounters(
 VOID NICReadDataAlign(
     PNIC_ADAPTER Adapter,
     PUSHORT Target,
-    ULONG Source,
+    ULONG_PTR Source,
     USHORT Length);
 
 VOID NICWriteDataAlign(
     PNIC_ADAPTER Adapter,
-    ULONG Target,
+    ULONG_PTR Target,
     PUSHORT Source,
     USHORT Length);
 
 VOID NICReadData(
     PNIC_ADAPTER Adapter,
     PUCHAR Target,
-    ULONG Source,
+    ULONG_PTR Source,
     USHORT Length);
 
 VOID NICWriteData(
     PNIC_ADAPTER Adapter,
-    ULONG Target,
+    ULONG_PTR Target,
     PUCHAR Source,
     USHORT Length);
 
index c055d43..d7ceafb 100644 (file)
 #include <debug.h>
 
 /* Null-terminated array of ports to probe. This is "semi-risky" (Don Becker).  */
-ULONG ProbeAddressList[] = { 0x280, 0x300, 0x320, 0x340, 0x360, 0x380, 0 };
+ULONG_PTR ProbeAddressList[] = { 0x280, 0x300, 0x320, 0x340, 0x360, 0x380, 0 };
 
 static BOOLEAN ProbeAddressForNIC(
-    ULONG address)
+    ULONG_PTR address)
 /*
  * FUNCTION: Probes an address for a NIC
  * ARGUMENTS:
@@ -129,7 +129,7 @@ static BOOLEAN NICTestRAM(
  *     Start at 1KB and test for every 1KB up to 64KB
  */
 {
-    ULONG Base;
+    ULONG_PTR Base;
 
     NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
 
index f37002d..2f8f563 100644 (file)
@@ -802,7 +802,7 @@ SerialDeviceControl(
                                 * as pending, it might be possible to complete the
                                 * Irp before pending it, leading to a crash! */
                                WaitingIrp = InterlockedCompareExchangePointer(
-                                       &DeviceExtension->WaitOnMaskIrp,
+                                       (PVOID)&DeviceExtension->WaitOnMaskIrp,
                                        Irp,
                                        NULL);
 
diff --git a/reactos/drivers/storage/scsiport/scsiport.pspec b/reactos/drivers/storage/scsiport/scsiport.pspec
new file mode 100644 (file)
index 0000000..65c7547
--- /dev/null
@@ -0,0 +1,51 @@
+#ifdef __x86_64__
+#define MAYBEFWD(x)
+#else
+#define MAYBEFWD(x) x
+#endif
+
+@ cdecl ScsiDebugPrint()
+@ stdcall ScsiPortCompleteRequest(ptr long long long long)
+@ stdcall ScsiPortConvertPhysicalAddressToUlong(long long)
+@ stdcall ScsiPortConvertUlongToPhysicalAddress(long) MAYBEFWD(NTOSKRNL.RtlConvertUlongToLargeInteger)
+@ stdcall ScsiPortFlushDma(ptr)
+@ stdcall ScsiPortFreeDeviceBase(ptr ptr)
+@ stdcall ScsiPortGetBusData(ptr long long long ptr long)
+@ stdcall ScsiPortGetDeviceBase(ptr long long long long long long)
+@ stdcall ScsiPortGetLogicalUnit(ptr long long long)
+@ stdcall ScsiPortGetPhysicalAddress(ptr ptr ptr long)
+@ stdcall ScsiPortGetSrb(ptr long long long long)
+@ stdcall ScsiPortGetUncachedExtension(ptr ptr long)
+@ stdcall ScsiPortGetVirtualAddress(ptr long long)
+@ stdcall ScsiPortInitialize(ptr ptr ptr ptr)
+@ stdcall ScsiPortIoMapTransfer(ptr ptr long long)
+@ stdcall ScsiPortLogError(ptr ptr long long long long long)
+@ stdcall ScsiPortMoveMemory(ptr ptr long)
+@ cdecl ScsiPortNotification()
+@ stdcall ScsiPortReadPortBufferUchar(ptr ptr long) MAYBEFWD(HAL.READ_PORT_BUFFER_UCHAR)
+@ stdcall ScsiPortReadPortBufferUshort(ptr ptr long) MAYBEFWD(HAL.READ_PORT_BUFFER_USHORT)
+@ stdcall ScsiPortReadPortBufferUlong(ptr ptr long) MAYBEFWD(HAL.READ_PORT_BUFFER_ULONG)
+@ stdcall ScsiPortReadPortUchar(ptr) MAYBEFWD(HAL.READ_PORT_UCHAR)
+@ stdcall ScsiPortReadPortUshort(ptr) MAYBEFWD(HAL.READ_PORT_USHORT)
+@ stdcall ScsiPortReadPortUlong(ptr) MAYBEFWD(HAL.READ_PORT_ULONG)
+@ stdcall ScsiPortReadRegisterBufferUchar(ptr ptr long) MAYBEFWD(NTOSKRNL.READ_REGISTER_BUFFER_UCHAR)
+@ stdcall ScsiPortReadRegisterBufferUshort(ptr ptr long) MAYBEFWD(NTOSKRNL.READ_REGISTER_BUFFER_USHORT)
+@ stdcall ScsiPortReadRegisterBufferUlong(ptr ptr long) MAYBEFWD(NTOSKRNL.READ_REGISTER_BUFFER_ULONG)
+@ stdcall ScsiPortReadRegisterUchar(ptr) MAYBEFWD(NTOSKRNL.READ_REGISTER_UCHAR)
+@ stdcall ScsiPortReadRegisterUshort(ptr) MAYBEFWD(NTOSKRNL.READ_REGISTER_USHORT)
+@ stdcall ScsiPortReadRegisterUlong(ptr) MAYBEFWD(NTOSKRNL.READ_REGISTER_ULONG)
+@ stdcall ScsiPortSetBusDataByOffset(ptr long long long ptr long long)
+@ stdcall ScsiPortStallExecution(long) HAL.KeStallExecutionProcessor
+@ stdcall ScsiPortValidateRange(ptr long long long long long long)
+@ stdcall ScsiPortWritePortBufferUchar(ptr ptr long) MAYBEFWD(HAL.WRITE_PORT_BUFFER_UCHAR)
+@ stdcall ScsiPortWritePortBufferUshort(ptr ptr long) MAYBEFWD(HAL.WRITE_PORT_BUFFER_USHORT)
+@ stdcall ScsiPortWritePortBufferUlong(ptr ptr long) MAYBEFWD(HAL.WRITE_PORT_BUFFER_ULONG)
+@ stdcall ScsiPortWritePortUchar(ptr long) MAYBEFWD(HAL.WRITE_PORT_UCHAR)
+@ stdcall ScsiPortWritePortUshort(ptr long) MAYBEFWD(HAL.WRITE_PORT_USHORT)
+@ stdcall ScsiPortWritePortUlong(ptr long) MAYBEFWD(HAL.WRITE_PORT_ULONG)
+@ stdcall ScsiPortWriteRegisterBufferUchar(ptr ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_BUFFER_UCHAR)
+@ stdcall ScsiPortWriteRegisterBufferUshort(ptr ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT)
+@ stdcall ScsiPortWriteRegisterBufferUlong(ptr ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_BUFFER_ULONG)
+@ stdcall ScsiPortWriteRegisterUchar(ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_UCHAR)
+@ stdcall ScsiPortWriteRegisterUshort(ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_USHORT)
+@ stdcall ScsiPortWriteRegisterUlong(ptr long) MAYBEFWD(NTOSKRNL.WRITE_REGISTER_ULONG)
index 57750f9..556d742 100644 (file)
@@ -3,10 +3,11 @@
 <module name="scsiport" type="kernelmodedriver" installbase="system32/drivers" installname="scsiport.sys">
        <bootstrap installbase="$(CDOUTPUT)" />
        <define name="_SCSIPORT_" />
-       <importlibrary definition="scsiport.spec" />
+       <importlibrary definition="scsiport.pspec" />
        <include base="scsiport">.</include>
        <library>ntoskrnl</library>
        <library>hal</library>
        <file>scsiport.c</file>
+       <file>stubs.c</file>
        <file>scsiport.rc</file>
 </module>
diff --git a/reactos/drivers/storage/scsiport/scsiport.spec b/reactos/drivers/storage/scsiport/scsiport.spec
deleted file mode 100644 (file)
index b779b1e..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-@ cdecl ScsiDebugPrint()
-@ stdcall ScsiPortCompleteRequest(ptr long long long long)
-@ stdcall ScsiPortConvertPhysicalAddressToUlong(long long)
-@ stdcall ScsiPortConvertUlongToPhysicalAddress(long) NTOSKRNL.RtlConvertUlongToLargeInteger
-@ stdcall ScsiPortFlushDma(ptr)
-@ stdcall ScsiPortFreeDeviceBase(ptr ptr)
-@ stdcall ScsiPortGetBusData(ptr long long long ptr long)
-@ stdcall ScsiPortGetDeviceBase(ptr long long long long long long)
-@ stdcall ScsiPortGetLogicalUnit(ptr long long long)
-@ stdcall ScsiPortGetPhysicalAddress(ptr ptr ptr long)
-@ stdcall ScsiPortGetSrb(ptr long long long long)
-@ stdcall ScsiPortGetUncachedExtension(ptr ptr long)
-@ stdcall ScsiPortGetVirtualAddress(ptr long long)
-@ stdcall ScsiPortInitialize(ptr ptr ptr ptr)
-@ stdcall ScsiPortIoMapTransfer(ptr ptr long long)
-@ stdcall ScsiPortLogError(ptr ptr long long long long long)
-@ stdcall ScsiPortMoveMemory(ptr ptr long)
-@ cdecl ScsiPortNotification()
-@ stdcall ScsiPortReadPortBufferUchar(ptr ptr long) HAL.READ_PORT_BUFFER_UCHAR
-@ stdcall ScsiPortReadPortBufferUshort(ptr ptr long) HAL.READ_PORT_BUFFER_USHORT
-@ stdcall ScsiPortReadPortBufferUlong(ptr ptr long) HAL.READ_PORT_BUFFER_ULONG
-@ stdcall ScsiPortReadPortUchar(ptr) HAL.READ_PORT_UCHAR
-@ stdcall ScsiPortReadPortUshort(ptr) HAL.READ_PORT_USHORT
-@ stdcall ScsiPortReadPortUlong(ptr) HAL.READ_PORT_ULONG
-@ stdcall ScsiPortReadRegisterBufferUchar(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_UCHAR
-@ stdcall ScsiPortReadRegisterBufferUshort(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_USHORT
-@ stdcall ScsiPortReadRegisterBufferUlong(ptr ptr long) NTOSKRNL.READ_REGISTER_BUFFER_ULONG
-@ stdcall ScsiPortReadRegisterUchar(ptr) NTOSKRNL.READ_REGISTER_UCHAR
-@ stdcall ScsiPortReadRegisterUshort(ptr) NTOSKRNL.READ_REGISTER_USHORT
-@ stdcall ScsiPortReadRegisterUlong(ptr) NTOSKRNL.READ_REGISTER_ULONG
-@ stdcall ScsiPortSetBusDataByOffset(ptr long long long ptr long long)
-@ stdcall ScsiPortStallExecution(long) HAL.KeStallExecutionProcessor
-@ stdcall ScsiPortValidateRange(ptr long long long long long long)
-@ stdcall ScsiPortWritePortBufferUchar(ptr ptr long) HAL.WRITE_PORT_BUFFER_UCHAR
-@ stdcall ScsiPortWritePortBufferUshort(ptr ptr long) HAL.WRITE_PORT_BUFFER_USHORT
-@ stdcall ScsiPortWritePortBufferUlong(ptr ptr long) HAL.WRITE_PORT_BUFFER_ULONG
-@ stdcall ScsiPortWritePortUchar(ptr long) HAL.WRITE_PORT_UCHAR
-@ stdcall ScsiPortWritePortUshort(ptr long) HAL.WRITE_PORT_USHORT
-@ stdcall ScsiPortWritePortUlong(ptr long) HAL.WRITE_PORT_ULONG
-@ stdcall ScsiPortWriteRegisterBufferUchar(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_UCHAR
-@ stdcall ScsiPortWriteRegisterBufferUshort(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_USHORT
-@ stdcall ScsiPortWriteRegisterBufferUlong(ptr ptr long) NTOSKRNL.WRITE_REGISTER_BUFFER_ULONG
-@ stdcall ScsiPortWriteRegisterUchar(ptr long) NTOSKRNL.WRITE_REGISTER_UCHAR
-@ stdcall ScsiPortWriteRegisterUshort(ptr long) NTOSKRNL.WRITE_REGISTER_USHORT
-@ stdcall ScsiPortWriteRegisterUlong(ptr long) NTOSKRNL.WRITE_REGISTER_ULONG
diff --git a/reactos/drivers/storage/scsiport/stubs.c b/reactos/drivers/storage/scsiport/stubs.c
new file mode 100644 (file)
index 0000000..9e286d1
--- /dev/null
@@ -0,0 +1,250 @@
+/*
+ * COPYRIGHT:       See COPYING in the top level directory
+ * PROJECT:         ReactOS Storage Stack
+ * FILE:            drivers/storage/scsiport/stubs.c
+ * PURPOSE:         SCSI port driver
+ * PROGRAMMER:      Timo Kreuzer (timo.kreuzer@reactos.org)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntddk.h>
+#include <srb.h>
+
+#define NDEBUG
+#include <debug.h>
+
+#ifdef _MSC_VER
+  #define DDKAPI
+#endif
+
+SCSI_PHYSICAL_ADDRESS
+DDKAPI
+ScsiPortConvertUlongToPhysicalAddress(
+    IN ULONG  UlongAddress)
+{
+    return RtlConvertUlongToLargeInteger(UlongAddress);
+}
+
+VOID
+DDKAPI
+ScsiPortReadPortBufferUchar(
+    IN PUCHAR Port,
+    IN PUCHAR Buffer,
+    IN ULONG  Count)
+{
+    READ_PORT_BUFFER_UCHAR(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortReadPortBufferUshort(
+    IN PUSHORT Port,
+    IN PUSHORT Buffer,
+    IN ULONG   Count)
+{
+    READ_PORT_BUFFER_USHORT(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortReadPortBufferUlong(
+    IN PULONG Port,
+    IN PULONG Buffer,
+    IN ULONG  Count)
+{
+    READ_PORT_BUFFER_ULONG(Port, Buffer, Count);
+}
+
+UCHAR
+DDKAPI
+ScsiPortReadPortUchar(
+    IN PUCHAR Port)
+{
+    return READ_PORT_UCHAR(Port);
+}
+
+USHORT
+DDKAPI
+ScsiPortReadPortUshort(
+    IN PUSHORT Port)
+{
+    return READ_PORT_USHORT(Port);
+}
+
+ULONG
+DDKAPI
+ScsiPortReadPortUlong(
+    IN PULONG Port)
+{
+    return READ_PORT_ULONG(Port);
+}
+
+VOID
+DDKAPI
+ScsiPortReadRegisterBufferUchar(
+    IN PUCHAR Register,
+    IN PUCHAR Buffer,
+    IN ULONG Count)
+{
+    READ_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortReadRegisterBufferUshort(
+    IN PUSHORT Register,
+    IN PUSHORT Buffer,
+    IN ULONG Count)
+{
+    READ_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortReadRegisterBufferUlong(
+    IN PULONG Register,
+    IN PULONG Buffer,
+    IN ULONG Count)
+{
+    READ_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
+}
+
+UCHAR
+DDKAPI
+ScsiPortReadRegisterUchar(
+    IN PUCHAR Register)
+{
+    return READ_REGISTER_UCHAR(Register);
+}
+
+USHORT
+DDKAPI
+ScsiPortReadRegisterUshort(
+    IN PUSHORT Register)
+{
+    return READ_REGISTER_USHORT(Register);
+}
+
+ULONG
+DDKAPI
+ScsiPortReadRegisterUlong(
+    IN PULONG Register)
+{
+    return READ_REGISTER_ULONG(Register);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortBufferUchar(
+    IN PUCHAR Port,
+    IN PUCHAR Buffer,
+    IN ULONG Count)
+{
+    WRITE_PORT_BUFFER_UCHAR(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortBufferUshort(
+    IN PUSHORT Port,
+    IN PUSHORT Buffer,
+    IN ULONG Count)
+{
+    WRITE_PORT_BUFFER_USHORT(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortBufferUlong(
+    IN PULONG Port,
+    IN PULONG Buffer,
+    IN ULONG Count)
+{
+    WRITE_PORT_BUFFER_ULONG(Port, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortUchar(
+    IN PUCHAR Port,
+    IN UCHAR Value)
+{
+    WRITE_PORT_UCHAR(Port, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortUshort(
+    IN PUSHORT Port,
+    IN USHORT Value)
+{
+    WRITE_PORT_USHORT(Port, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWritePortUlong(
+    IN PULONG Port,
+    IN ULONG Value)
+{
+    WRITE_PORT_ULONG(Port, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterBufferUchar(
+    IN PUCHAR Register,
+    IN PUCHAR Buffer,
+    IN ULONG Count)
+{
+    WRITE_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterBufferUshort(
+    IN PUSHORT Register,
+    IN PUSHORT Buffer,
+    IN ULONG Count)
+{
+    WRITE_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterBufferUlong(
+    IN PULONG Register,
+    IN PULONG Buffer,
+    IN ULONG Count)
+{
+    WRITE_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterUchar(
+    IN PUCHAR  Register,
+    IN ULONG  Value)
+{
+    WRITE_REGISTER_UCHAR(Register, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterUshort(
+    IN PUSHORT Register,
+    IN USHORT Value)
+{
+    WRITE_REGISTER_USHORT(Register, Value);
+}
+
+VOID
+DDKAPI
+ScsiPortWriteRegisterUlong(
+    IN PULONG Register,
+    IN ULONG Value)
+{
+    WRITE_REGISTER_ULONG(Register, Value);
+}
+
index 2d1a943..80d032c 100644 (file)
@@ -574,7 +574,7 @@ DrvGetModes(IN HANDLE Driver,
                 /* next DEVMODE entry */
                 OutputModes--;
 
-                DM = (PDEVMODEW) ( ((ULONG)DM) + sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
+                DM = (PDEVMODEW) ( ((ULONG_PTR)DM) + sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
 
                 OutputSize += (sizeof(DEVMODEW) + DRIVER_EXTRA_SIZE);
             }