]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/SdMmcPciHcDxe: Do not map memory for non DMA transfer
authorAlbecki, Mateusz <mateusz.albecki@intel.com>
Thu, 27 Feb 2020 17:25:25 +0000 (01:25 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 5 Mar 2020 01:51:59 +0000 (01:51 +0000)
commit63fd7f389874081ea37452b1f79ac013d52755e3
treeee4d89b6630c671ef8b497f1201b770659608dc4
parent7d48d20a3dbea79f3b33b562c84bdf8decc4b368
MdeModulePkg/SdMmcPciHcDxe: Do not map memory for non DMA transfer

Driver code used to map memory for DMA transfer even if host doesn't
support DMA. This is causing memory corruption when driver transfers
data using PIO. This change refactors the code to skip call to
PciIo->Map for non DMA transfers.

Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Marcin Wojtas <mw@semihalf.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
Tested-by: Hao A Wu <hao.a.wu@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c