]> git.proxmox.com Git - mirror_edk2.git/commit - EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c
Revert "EmbeddedPkg/Lan9118Dxe: use MemoryFence"
authorMark Rutland <mark.rutland@arm.com>
Fri, 6 May 2016 17:19:06 +0000 (18:19 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 10 May 2016 12:48:25 +0000 (14:48 +0200)
commit28f52b9fae9feba369ff0d773e0b0e610c0aa6f8
treea600271e569ba26795b88fc88cb92989b11cdc5c
parentd1ec2b2f78b752b9dfc06843f994cbfad134ea63
Revert "EmbeddedPkg/Lan9118Dxe: use MemoryFence"

Commit a4626006bbf86113 ("EmbeddedPkg/Lan9118Dxe: use MemoryFence")
replaced some stalls with memory fences, on the presumption that these
were erroneously being used to order memory accesses. However, this was
not the case.

LAN9118 devices require a timing delay between state-changing
reads/writes and subsequent reads, as updates to the register file are
asynchronous and the effects of state-changes are not immediately
visible to subsequent reads.

This delay cannot be ensured through the use of memory barriers, which
only enforce observable ordering, and not timing. Thus, converting these
stalls to memory fences was erroneous, and may result in stale values
being read.

This reverts commit a4626006bbf86113453aeb7920895e66cdd04737.

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeUtil.c