aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-07-29 12:04:53 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-07-29 12:04:53 +0100
commit893dc8300c80e3dc32f31e968cf7aa0904da50c3 (patch)
treeeeb413557f2ad65cb85db2bdcf34f4e97b65ac9b /hw
parent08831f67d3ddc578a63a2d69eb34144f62281b8b (diff)
parentf77bed14f01557596727c4eea042e9818c242049 (diff)
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Mon 29 Jul 2019 09:30:48 BST # gpg: using RSA key EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: net/colo-compare.c: Fix memory leak and code style issue. net: tap: replace snprintf with g_strdup_printf calls qemu-bridge-helper: move repeating code in parse_acl_file qemu-bridge-helper: restrict interface name to IFNAMSIZ e1000: don't raise interrupt in pre_save() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/net/e1000.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 1dc1466332..a023ceb27c 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -1381,11 +1381,6 @@ static int e1000_pre_save(void *opaque)
E1000State *s = opaque;
NetClientState *nc = qemu_get_queue(s->nic);
- /* If the mitigation timer is active, emulate a timeout now. */
- if (s->mit_timer_on) {
- e1000_mit_timer(s);
- }
-
/*
* If link is down and auto-negotiation is supported and ongoing,
* complete auto-negotiation immediately. This allows us to look
@@ -1423,7 +1418,8 @@ static int e1000_post_load(void *opaque, int version_id)
s->mit_irq_level = false;
}
s->mit_ide = 0;
- s->mit_timer_on = false;
+ s->mit_timer_on = true;
+ timer_mod(s->mit_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + 1);
/* nc.link_down can't be migrated, so infer link_down according
* to link status bit in mac_reg[STATUS].