[ipxe-devel] [PATCH] [tg3] Added missing memory barrier.

Leendert van Doorn leendert at paramecium.org
Mon Jun 13 13:14:42 UTC 2016


ARM64 has a weaker memory order model than x86. The missing memory barrier
caused phy initialization notification to be delayed beyong the link-wait
timeout (15 secs). This patch fixes that problem.

Signed-of-by: Leendert van Doorn <leendert at paramecium.org>
---
 src/drivers/net/tg3/tg3.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/drivers/net/tg3/tg3.c b/src/drivers/net/tg3/tg3.c
index 824c9b1..1bed066 100644
--- a/src/drivers/net/tg3/tg3.c
+++ b/src/drivers/net/tg3/tg3.c
@@ -486,6 +486,8 @@ static void tg3_poll(struct net_device *dev)
 	 */
 	tp->hw_status->status &= ~SD_STATUS_UPDATED;
 
+	mb();
+
 	tg3_poll_link(tp);
 	tg3_tx_complete(dev);
 	tg3_rx_complete(dev);
-- 
2.5.5




More information about the ipxe-devel mailing list