Map->Operation is used to select whether a DMA region that
is being bounced has the source buffer copied to it. Except
Map->Operation isn't yet set, so the behavior is somewhat
random. Instead use the passed in Operation parameter.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
goto FreeMapInfo;\r
}\r
\r
- if (Map->Operation == MapOperationBusMasterRead) {\r
+ if (Operation == MapOperationBusMasterRead) {\r
CopyMem (Map->BufferAddress, (VOID *)(UINTN)HostAddress, *NumberOfBytes);\r
}\r
mCpu->FlushDataCache (mCpu, (UINTN)Map->BufferAddress, AllocSize,\r