Author: tfaber Date: Wed Apr 26 10:53:32 2017 New Revision: 74408
URL: http://svn.reactos.org/svn/reactos?rev=74408&view=rev Log: [USBEHCI][USBOHCI] - Touch the virtual address of DMA buffers before calling MmGetPhysicalAddress on them. This ensures page directories are correctly set up for the current process context, and fixes random DMA operation failures ("MM:MmGetPhysicalAddressFailed"). This is not a hack -- using MmGetPhysicalAddress for DMA in the first place is. CORE-9224 #resolve
Modified: trunk/reactos/drivers/usb/usbehci/usb_request.cpp trunk/reactos/drivers/usb/usbohci/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_req... ============================================================================== --- trunk/reactos/drivers/usb/usbehci/usb_request.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbehci/usb_request.cpp [iso-8859-1] Wed Apr 26 10:53:32 2017 @@ -615,8 +615,9 @@ do { // - // get address - // + // get address (HACK) + // + *(volatile char *)TransferBuffer; Address = MmGetPhysicalAddress(TransferBuffer);
//
Modified: trunk/reactos/drivers/usb/usbohci/usb_request.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbohci/usb_req... ============================================================================== --- trunk/reactos/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/usb/usbohci/usb_request.cpp [iso-8859-1] Wed Apr 26 10:53:32 2017 @@ -784,8 +784,9 @@ }
// - // get physical page - // + // get physical page (HACK) + // + *(volatile char *)TransferBuffer; Page = MmGetPhysicalAddress(Buffer).LowPart;
//