From: Olivier Martin Date: Mon, 21 Oct 2013 11:06:51 +0000 (+0000) Subject: ArmPlatformPkg/PL180MciDxe: Fixed check for space in transmit FIFO X-Git-Tag: edk2-stable201903~12164 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=4f8c9ae05d699c72fbe4b5bda4b1c64e8c907337;p=mirror_edk2.git ArmPlatformPkg/PL180MciDxe: Fixed check for space in transmit FIFO This patch prevents a buffer underrun error on the Versatile Express Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14793 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c index db8b29fac3..f7a4d44311 100644 --- a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c +++ b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c @@ -336,7 +336,7 @@ MciWriteBlockData ( Loop++; MmioWrite32(MCI_FIFO_REG, Buffer[Loop]); Loop++; - } else if ((Status & MCI_STATUS_CMD_TXFIFOEMPTY)) { + } else if (!(Status & MCI_STATUS_CMD_TXFIFOFULL)) { MmioWrite32(MCI_FIFO_REG, Buffer[Loop]); Loop++; } else {