- Add a hack to avoid MmGetPhysicalAddress failures during USB transfers
CORE-9224

svn path=/branches/ros-branch-0_4_2/; revision=72016
This commit is contained in:
Thomas Faber 2016-07-27 10:55:39 +00:00
parent 633468a888
commit a20eaf6799
2 changed files with 4 additions and 0 deletions

View file

@ -601,6 +601,7 @@ CUSBRequest::InitDescriptor(
//
// get address
//
*(volatile char *)TransferBuffer; // HACK for CORE-9224
Address = MmGetPhysicalAddress(TransferBuffer);
//

View file

@ -771,6 +771,7 @@ CUSBRequest::BuildIsochronousEndpoint(
//
// get physical page
//
*(volatile char *)Buffer; // HACK for CORE-9224
Page = MmGetPhysicalAddress(Buffer).LowPart;
//
@ -1087,6 +1088,7 @@ CUSBRequest::InitDescriptor(
//
// store physical address of buffer
//
*(volatile char *)TransferBuffer; // HACK for CORE-9224
CurrentDescriptor->BufferPhysical = MmGetPhysicalAddress(TransferBuffer).LowPart;
CurrentDescriptor->LastPhysicalByteAddress = CurrentDescriptor->BufferPhysical + TransferBufferLength - 1;
@ -1503,6 +1505,7 @@ CUSBRequest::BuildControlTransferDescriptor(
//
// store physical address of buffer
//
*(volatile char *)MmGetMdlVirtualAddress(m_TransferBufferMDL); // HACK for CORE-9224
DataDescriptor->BufferPhysical = MmGetPhysicalAddress(MmGetMdlVirtualAddress(m_TransferBufferMDL)).LowPart;
DataDescriptor->LastPhysicalByteAddress = DataDescriptor->BufferPhysical + m_TransferBufferLength - 1;