dc54ced MdeModulePkg/AtaAtapiPassThru: unmap DMA buffers after disabling BM DMA

Authored and Committed by lersek 6 years ago
    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>