aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-01-24 13:47:46 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-01-27 06:20:37 +0000
commitb1927cf1ae6161942dcca115f20a3e6e7b0a6cc3 (patch)
treef580a145de4d1dbcd57060c1c70d92e26e7eda79 /hw
parentc455d17c09f797055ec52afc25e8735c72d00ca0 (diff)
e1000: Preserve link state across device reset
A device reset does not affect the link state, only set_link does. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/e1000.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/e1000.c b/hw/e1000.c
index 86c5416bd1..76e736f171 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -1133,6 +1133,11 @@ static void e1000_reset(void *opaque)
memmove(d->mac_reg, mac_reg_init, sizeof mac_reg_init);
d->rxbuf_min_shift = 1;
memset(&d->tx, 0, sizeof d->tx);
+
+ if (d->nic->nc.link_down) {
+ d->mac_reg[STATUS] &= ~E1000_STATUS_LU;
+ d->phy_reg[PHY_STATUS] &= ~MII_SR_LINK_STATUS;
+ }
}
static NetClientInfo net_e1000_info = {