diff mbox

[v2,4/4] e1000: signal guest on successful link auto-negotiation

Message ID 1403193336-32101-5-git-send-email-somlo@cmu.edu
State New
Headers show

Commit Message

Gabriel L. Somlo June 19, 2014, 3:55 p.m. UTC
Generate a link status change interrupt once link auto-netotiation
is successfully completed. This does not affect Linux and Windows
(XP and 7 tested) in any way, but is needed by the stock OS X driver
(AppleIntel8254XEthernet.kext), which would otherwise fail to notice
the link status change event.

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/net/e1000.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index fd9b9be..8ee5225 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -344,6 +344,7 @@  e1000_autoneg_timer(void *opaque)
         s->phy_reg[PHY_LP_ABILITY] |= MII_LPAR_LPACK;
         s->phy_reg[PHY_STATUS] |= MII_SR_AUTONEG_COMPLETE;
         DBGOUT(PHY, "Auto negotiation is completed\n");
+        set_ics(s, 0, E1000_ICS_LSC); /* signal link status change to guest */
     }
 }