]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
e1000: signal guest on successful link auto-negotiation
authorGabriel L. Somlo <gsomlo@gmail.com>
Thu, 19 Jun 2014 15:55:36 +0000 (11:55 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 23 Jun 2014 14:38:00 +0000 (17:38 +0300)
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>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/e1000.c

index d6ef802ce90ca58d4876a254232e61183928298b..d20f8c8ff232ab209285948d69c44e3f4dacd3b8 100644 (file)
@@ -213,6 +213,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 */
     }
 }