mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:25:48 +00:00
[USBPORT][USBOHCI_NEW] Avoid using pointers for physical addresses.
This commit is contained in:
parent
837411e292
commit
c89a190ea6
6 changed files with 17 additions and 17 deletions
|
@ -824,8 +824,8 @@ USBPORT_StartDevice(IN PDEVICE_OBJECT FdoDevice,
|
|||
goto ExitWithError;
|
||||
}
|
||||
|
||||
UsbPortResources->StartVA = (PVOID)HeaderBuffer->VirtualAddress;
|
||||
UsbPortResources->StartPA = (PVOID)HeaderBuffer->PhysicalAddress;
|
||||
UsbPortResources->StartVA = HeaderBuffer->VirtualAddress;
|
||||
UsbPortResources->StartPA = HeaderBuffer->PhysicalAddress;
|
||||
|
||||
FdoExtension->MiniPortCommonBuffer = HeaderBuffer;
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ USBPORT_ResumeController(IN PDEVICE_OBJECT FdoDevice)
|
|||
|
||||
RtlZeroMemory(FdoExtension->MiniPortExt, Packet->MiniPortExtensionSize);
|
||||
|
||||
RtlZeroMemory(FdoExtension->UsbPortResources.StartVA,
|
||||
RtlZeroMemory((PVOID)FdoExtension->UsbPortResources.StartVA,
|
||||
Packet->MiniPortResourcesSize);
|
||||
|
||||
FdoExtension->UsbPortResources.IsChirpHandled = TRUE;
|
||||
|
|
|
@ -1696,7 +1696,7 @@ USBPORT_AllocateCommonBuffer(IN PDEVICE_OBJECT FdoDevice,
|
|||
PHYSICAL_ADDRESS LogicalAddress;
|
||||
ULONG_PTR BaseVA;
|
||||
ULONG_PTR StartBufferVA;
|
||||
ULONG_PTR StartBufferPA;
|
||||
ULONG StartBufferPA;
|
||||
|
||||
DPRINT("USBPORT_AllocateCommonBuffer: FdoDevice - %p, BufferLength - %p\n",
|
||||
FdoDevice,
|
||||
|
@ -2108,7 +2108,7 @@ USBPORT_RequestAsyncCallback(IN PVOID MiniPortExtension,
|
|||
|
||||
PVOID
|
||||
NTAPI
|
||||
USBPORT_GetMappedVirtualAddress(IN PVOID PhysicalAddress,
|
||||
USBPORT_GetMappedVirtualAddress(IN ULONG PhysicalAddress,
|
||||
IN PVOID MiniPortExtension,
|
||||
IN PVOID MiniPortEndpoint)
|
||||
{
|
||||
|
@ -2129,7 +2129,7 @@ USBPORT_GetMappedVirtualAddress(IN PVOID PhysicalAddress,
|
|||
|
||||
HeaderBuffer = Endpoint->HeaderBuffer;
|
||||
|
||||
Offset = (ULONG_PTR)PhysicalAddress - HeaderBuffer->PhysicalAddress;
|
||||
Offset = PhysicalAddress - HeaderBuffer->PhysicalAddress;
|
||||
VirtualAddress = HeaderBuffer->VirtualAddress + Offset;
|
||||
|
||||
return (PVOID)VirtualAddress;
|
||||
|
|
|
@ -148,7 +148,7 @@ typedef struct _USBPORT_COMMON_BUFFER_HEADER {
|
|||
PHYSICAL_ADDRESS LogicalAddress;
|
||||
SIZE_T BufferLength;
|
||||
ULONG_PTR VirtualAddress;
|
||||
ULONG_PTR PhysicalAddress;
|
||||
ULONG PhysicalAddress;
|
||||
} USBPORT_COMMON_BUFFER_HEADER, *PUSBPORT_COMMON_BUFFER_HEADER;
|
||||
|
||||
typedef struct _USBPORT_ENDPOINT *PUSBPORT_ENDPOINT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue