From ca7612e8761bc4645d1fae1e5a5a75dacaf4d612 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 16 Feb 2012 23:19:27 +0000 Subject: [PATCH] [USBEHCI] - Fix a few 64-bit issues svn path=/trunk/; revision=55653 --- reactos/drivers/usb/usbehci/usb_request.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/reactos/drivers/usb/usbehci/usb_request.cpp b/reactos/drivers/usb/usbehci/usb_request.cpp index 27be3736ca1..dd5f00eef70 100644 --- a/reactos/drivers/usb/usbehci/usb_request.cpp +++ b/reactos/drivers/usb/usbehci/usb_request.cpp @@ -634,6 +634,7 @@ CUSBRequest::InitDescriptor( OUT PULONG OutDescriptorLength) { ULONG Index, Length = 0, PageOffset, BufferLength; + PHYSICAL_ADDRESS Address; // // init transfer descriptor @@ -653,10 +654,16 @@ CUSBRequest::InitDescriptor( Index = 0; 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 @@ CUSBRequest::BuildTransferDescriptorChain( MaxPacketSize = m_EndpointDescriptor->EndPointDescriptor.wMaxPacketSize; } - do { // @@ -962,7 +968,8 @@ CUSBRequest::BuildControlTransferQueueHead( 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 @@ CUSBRequest::CreateQueueHead( QueueHead->Token.Bits.InterruptOnComplete = FALSE; // - // FIXME check if that is really needed + // store address // QueueHead->PhysicalAddr = QueueHeadPhysicalAddress.LowPart; -- 2.17.1