]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c
MdeModulePkg/AtaAtapiPassThru: unmap DMA buffers after disabling BM DMA
authorLaszlo Ersek <lersek@redhat.com>
Thu, 7 Sep 2017 19:04:29 +0000 (21:04 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Fri, 8 Sep 2017 18:22:35 +0000 (20:22 +0200)
commit509daa658b79b21eb1ccd6230065867e22707a42
treeb26b9b216f35707a376366380651b8577765fe10
parenteed3f713052204e31f1c4703ef544897881c552e
MdeModulePkg/AtaAtapiPassThru: unmap DMA buffers after disabling BM DMA

In AtaAtapiPassThruStop(), if the device has been operating in AHCI mode,
we unmap the DMA buffers and then disable the device (including bus master
DMA). The order of these actions is wrong; we shouldn't unmap DMA buffers
until bus master DMA is turned off. Reverse the steps.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.c