https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c1944118ca8ab6d8d17c1…
commit c1944118ca8ab6d8d17c1402608fcb7b3b2d26aa
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Tue Feb 27 21:56:06 2018 +0100
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Sat Aug 4 19:19:34 2018 +0200
[USBPORT] Fix 64 bit issues
---
drivers/usb/usbport/device.c | 6 +++---
drivers/usb/usbport/endpoint.c | 2 +-
drivers/usb/usbport/ioctl.c | 2 +-
drivers/usb/usbport/pnp.c | 4 ++--
drivers/usb/usbport/roothub.c | 2 +-
drivers/usb/usbport/usbport.c | 2 +-
sdk/include/reactos/drivers/usbport/usbmport.h | 2 +-
7 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/usbport/device.c b/drivers/usb/usbport/device.c
index 070a6c9816..b28d9ef015 100644
--- a/drivers/usb/usbport/device.c
+++ b/drivers/usb/usbport/device.c
@@ -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;
diff --git a/drivers/usb/usbport/endpoint.c b/drivers/usb/usbport/endpoint.c
index 0386bd0f14..385206a0c8 100644
--- a/drivers/usb/usbport/endpoint.c
+++ b/drivers/usb/usbport/endpoint.c
@@ -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;
diff --git a/drivers/usb/usbport/ioctl.c b/drivers/usb/usbport/ioctl.c
index 7e29d3d618..3b3aedb09c 100644
--- a/drivers/usb/usbport/ioctl.c
+++ b/drivers/usb/usbport/ioctl.c
@@ -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;
diff --git a/drivers/usb/usbport/pnp.c b/drivers/usb/usbport/pnp.c
index 52c649e9b5..5033cc1d92 100644
--- a/drivers/usb/usbport/pnp.c
+++ b/drivers/usb/usbport/pnp.c
@@ -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;
diff --git a/drivers/usb/usbport/roothub.c b/drivers/usb/usbport/roothub.c
index f843afd83a..984569f406 100644
--- a/drivers/usb/usbport/roothub.c
+++ b/drivers/usb/usbport/roothub.c
@@ -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;
diff --git a/drivers/usb/usbport/usbport.c b/drivers/usb/usbport/usbport.c
index 9961063209..29c9ff9e27 100644
--- a/drivers/usb/usbport/usbport.c
+++ b/drivers/usb/usbport/usbport.c
@@ -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;
diff --git a/sdk/include/reactos/drivers/usbport/usbmport.h
b/sdk/include/reactos/drivers/usbport/usbmport.h
index a646eb1ab4..bb09cd0531 100644
--- a/sdk/include/reactos/drivers/usbport/usbmport.h
+++ b/sdk/include/reactos/drivers/usbport/usbmport.h
@@ -434,7 +434,7 @@ typedef VOID
PVOID,
PVOID,
USBD_STATUS,
- SIZE_T);
+ ULONG);
typedef ULONG
(NTAPI *PUSBPORT_COMPLETE_ISO_TRANSFER)(