Author: janderwald
Date: Thu Feb 16 23:19:27 2012
New Revision: 55653
URL:
http://svn.reactos.org/svn/reactos?rev=55653&view=rev
Log:
[USBEHCI]
- Fix a few 64-bit issues
Modified:
trunk/reactos/drivers/usb/usbehci/usb_request.cpp
Modified: trunk/reactos/drivers/usb/usbehci/usb_request.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbehci/usb_re…
==============================================================================
--- trunk/reactos/drivers/usb/usbehci/usb_request.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbehci/usb_request.cpp [iso-8859-1] Thu Feb 16 23:19:27
2012
@@ -634,6 +634,7 @@
OUT PULONG OutDescriptorLength)
{
ULONG Index, Length = 0, PageOffset, BufferLength;
+ PHYSICAL_ADDRESS Address;
//
// init transfer descriptor
@@ -654,9 +655,15 @@
do
{
//
+ // get address
+ //
+ Address = MmGetPhysicalAddress(TransferBuffer);
+
+ //
// use physical address
//
- CurrentDescriptor->BufferPointer[Index] =
MmGetPhysicalAddress(TransferBuffer).LowPart;
+ CurrentDescriptor->BufferPointer[Index] = Address.LowPart;
+ CurrentDescriptor->ExtendedBufferPointer[Index] = Address.HighPart;
//
// Get the offset from page size
@@ -755,7 +762,6 @@
MaxPacketSize = m_EndpointDescriptor->EndPointDescriptor.wMaxPacketSize;
}
-
do
{
//
@@ -962,7 +968,8 @@
SetupDescriptor->Token.Bits.PIDCode = PID_CODE_SETUP_TOKEN;
SetupDescriptor->Token.Bits.TotalBytesToTransfer =
sizeof(USB_DEFAULT_PIPE_SETUP_PACKET);
SetupDescriptor->Token.Bits.DataToggle = FALSE;
- SetupDescriptor->BufferPointer[0] =
(ULONG)PtrToUlong(m_DescriptorSetupPacket.LowPart);
+ SetupDescriptor->BufferPointer[0] = m_DescriptorSetupPacket.LowPart;
+ SetupDescriptor->ExtendedBufferPointer[0] = m_DescriptorSetupPacket.HighPart;
InsertTailList(&QueueHead->TransferDescriptorListHead,
&SetupDescriptor->DescriptorEntry);
@@ -1331,7 +1338,7 @@
QueueHead->Token.Bits.InterruptOnComplete = FALSE;
//
- // FIXME check if that is really needed
+ // store address
//
QueueHead->PhysicalAddr = QueueHeadPhysicalAddress.LowPart;