]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[tg3] Add missing memory barrier
authorLeendert van Doorn <leendert@paramecium.org>
Mon, 13 Jun 2016 13:14:42 +0000 (08:14 -0500)
committerMichael Brown <mcb30@ipxe.org>
Mon, 13 Jun 2016 14:14:43 +0000 (15:14 +0100)
ARM64 has a weaker memory order model than x86.  The missing memory
barrier caused phy initialization notification to be delayed beyond
the link-wait timeout (15 secs).

Signed-off-by: Leendert van Doorn <leendert@paramecium.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/tg3/tg3.c

index 824c9b1c06468e4ff1d2dd75b9d6232608d567fd..1bed06649c4e9dcc78ee0485bc8c5a5483f81a38 100644 (file)
@@ -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);