mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 17:10:22 +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
|
@ -672,8 +672,8 @@ OHCI_StartController(IN PVOID ohciExtension,
|
|||
return MPStatus;
|
||||
}
|
||||
|
||||
OhciExtension->HcResourcesVA = Resources->StartVA;
|
||||
OhciExtension->HcResourcesPA = Resources->StartPA;
|
||||
OhciExtension->HcResourcesVA = (POHCI_HC_RESOURCES)Resources->StartVA;
|
||||
OhciExtension->HcResourcesPA = (POHCI_HC_RESOURCES)Resources->StartPA;
|
||||
|
||||
DPRINT_OHCI("OHCI_StartController: HcResourcesVA - %p, HcResourcesPA - %p\n",
|
||||
OhciExtension->HcResourcesVA,
|
||||
|
@ -1731,9 +1731,9 @@ OHCI_AbortTransfer(IN PVOID ohciExtension,
|
|||
ED = OhciEndpoint->HcdED;
|
||||
NextTdPA = ED->HwED.HeadPointer & OHCI_ED_HEAD_POINTER_MASK;
|
||||
|
||||
NextTD = RegPacket.UsbPortGetMappedVirtualAddress((PVOID)NextTdPA,
|
||||
OhciExtension,
|
||||
OhciEndpoint);
|
||||
NextTD = RegPacket.UsbPortGetMappedVirtualAddress(NextTdPA,
|
||||
OhciExtension,
|
||||
OhciEndpoint);
|
||||
|
||||
if (NextTD->OhciTransfer == (ULONG)OhciTransfer)
|
||||
{
|
||||
|
@ -1978,7 +1978,7 @@ OHCI_PollAsyncEndpoint(IN POHCI_EXTENSION OhciExtension,
|
|||
DbgBreakPoint();
|
||||
}
|
||||
|
||||
NextTD = RegPacket.UsbPortGetMappedVirtualAddress((PVOID)NextTdPA,
|
||||
NextTD = RegPacket.UsbPortGetMappedVirtualAddress(NextTdPA,
|
||||
OhciExtension,
|
||||
OhciEndpoint);
|
||||
DPRINT_OHCI("NextTD - %p\n", NextTD);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -54,8 +54,8 @@ typedef struct _USBPORT_RESOURCES {
|
|||
ULONG Reserved;
|
||||
PVOID ResourceBase;
|
||||
SIZE_T IoSpaceLength;
|
||||
PVOID StartVA;
|
||||
PVOID StartPA;
|
||||
ULONG_PTR StartVA;
|
||||
ULONG StartPA;
|
||||
UCHAR LegacySupport;
|
||||
BOOLEAN IsChirpHandled;
|
||||
UCHAR Reserved2;
|
||||
|
@ -76,7 +76,7 @@ typedef struct _USBPORT_ENDPOINT_PROPERTIES {
|
|||
ULONG TransferType;
|
||||
ULONG Direction;
|
||||
ULONG_PTR BufferVA;
|
||||
ULONG_PTR BufferPA;
|
||||
ULONG BufferPA;
|
||||
ULONG BufferLength;
|
||||
ULONG Reserved3;
|
||||
ULONG MaxTransferSize;
|
||||
|
@ -454,7 +454,7 @@ typedef ULONG
|
|||
|
||||
typedef PVOID
|
||||
(NTAPI *PUSBPORT_GET_MAPPED_VIRTUAL_ADDRESS)(
|
||||
PVOID,
|
||||
ULONG,
|
||||
PVOID,
|
||||
PVOID);
|
||||
|
||||
|
|
Loading…
Reference in a new issue