[USBPORT] Fix 64 bit issues
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 27 Feb 2018 20:56:06 +0000 (21:56 +0100)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 4 Aug 2018 17:19:34 +0000 (19:19 +0200)
drivers/usb/usbport/device.c
drivers/usb/usbport/endpoint.c
drivers/usb/usbport/ioctl.c
drivers/usb/usbport/pnp.c
drivers/usb/usbport/roothub.c
drivers/usb/usbport/usbport.c
sdk/include/reactos/drivers/usbport/usbmport.h

index 070a6c9..b28d9ef 100644 (file)
@@ -479,7 +479,7 @@ USBPORT_InitInterfaceInfo(IN PUSBD_INTERFACE_INFORMATION InterfaceInfo,
 {
     PUSB_INTERFACE_DESCRIPTOR Descriptor;
     PUSBD_PIPE_INFORMATION Pipe;
-    USHORT Length;
+    SIZE_T Length;
     ULONG PipeFlags;
     ULONG NumberOfPipes;
     USBD_STATUS USBDStatus = USBD_STATUS_SUCCESS;
@@ -971,8 +971,8 @@ USBPORT_CreateDevice(IN OUT PUSB_DEVICE_HANDLE *pUsbdDeviceHandle,
     BOOL IsOpenedPipe;
     PVOID DeviceDescriptor;
     USB_DEFAULT_PIPE_SETUP_PACKET SetupPacket;
-    SIZE_T TransferedLen;
-    SIZE_T DescriptorMinSize;
+    ULONG TransferedLen;
+    ULONG DescriptorMinSize;
     UCHAR MaxPacketSize;
     PUSBPORT_DEVICE_EXTENSION FdoExtension;
     PUSBPORT_REGISTRATION_PACKET Packet;
index 0386bd0..385206a 100644 (file)
@@ -768,7 +768,7 @@ USBPORT_OpenPipe(IN PDEVICE_OBJECT FdoDevice,
     PUSBPORT_DEVICE_EXTENSION FdoExtension;
     PUSBPORT_RHDEVICE_EXTENSION PdoExtension;
     PUSBPORT_REGISTRATION_PACKET Packet;
-    ULONG EndpointSize;
+    SIZE_T EndpointSize;
     PUSBPORT_ENDPOINT Endpoint;
     PUSBPORT_ENDPOINT_PROPERTIES EndpointProperties;
     PUSB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
index 7e29d3d..3b3aedb 100644 (file)
@@ -210,7 +210,7 @@ NTSTATUS
 NTAPI
 USBPORT_GetUnicodeName(IN PDEVICE_OBJECT FdoDevice,
                        IN PIRP Irp,
-                       IN PULONG Information)
+                       IN PULONG_PTR Information)
 {
     PUSB_HCD_DRIVERKEY_NAME DriverKey;
     PIO_STACK_LOCATION IoStack;
index 52c649e..5033cc1 100644 (file)
@@ -961,7 +961,7 @@ USBPORT_ParseResources(IN PDEVICE_OBJECT FdoDevice,
         {
             if (PortDescriptor->Flags & CM_RESOURCE_PORT_IO)
             {
-                UsbPortResources->ResourceBase = (PVOID)PortDescriptor->u.Port.Start.LowPart;
+                UsbPortResources->ResourceBase = (PVOID)(ULONG_PTR)PortDescriptor->u.Port.Start.QuadPart;
             }
             else
             {
@@ -1413,7 +1413,7 @@ USBPORT_GetDeviceHwIds(IN PDEVICE_OBJECT FdoDevice,
     PUSBPORT_REGISTRATION_PACKET Packet;
     PVOID Id;
     WCHAR Buffer[300] = {0};
-    ULONG Length = 0;
+    SIZE_T Length = 0;
     size_t Remaining = sizeof(Buffer);
     PWCHAR EndBuffer;
 
index f843afd..984569f 100644 (file)
@@ -485,7 +485,7 @@ NTAPI
 USBPORT_RootHubEndpoint0(IN PUSBPORT_TRANSFER Transfer)
 {
     PDEVICE_OBJECT FdoDevice;
-    SIZE_T TransferLength;
+    ULONG TransferLength;
     PVOID Buffer;
     PURB Urb;
     PUSB_DEFAULT_PIPE_SETUP_PACKET SetupPacket;
index 9961063..29c9ff9 100644 (file)
@@ -2299,7 +2299,7 @@ USBPORT_MapTransfer(IN PDEVICE_OBJECT FdoDevice,
     BOOLEAN WriteToDevice;
     PHYSICAL_ADDRESS PhAddr = {{0, 0}};
     PHYSICAL_ADDRESS PhAddress = {{0, 0}};
-    SIZE_T TransferLength;
+    ULONG TransferLength;
     SIZE_T SgCurrentLength;
     SIZE_T ElementLength;
     PUSBPORT_DEVICE_HANDLE DeviceHandle;
index a646eb1..bb09cd0 100644 (file)
@@ -434,7 +434,7 @@ typedef VOID
   PVOID,
   PVOID,
   USBD_STATUS,
-  SIZE_T);
+  ULONG);
 
 typedef ULONG
 (NTAPI *PUSBPORT_COMPLETE_ISO_TRANSFER)(