diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-11-05 09:59:19 -0400 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-11-05 09:59:19 -0400 |
commit | e4d96a7eb83146c936d88182c8dee9ba899bb6bb (patch) | |
tree | a95c21d12770e94f41c0f3640be6f40dd0a155dc /hw | |
parent | 18e356a53a2926a15343b914db64324d63748f25 (diff) | |
parent | 3fd641ac5ec713e67129c1a57e8b6281182bd843 (diff) |
Merge remote-tracking branch 'remotes/jasonwang/tags/net-pull-request' into staging
# gpg: Signature made Thu 04 Nov 2021 11:42:00 PM EDT
# 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/jasonwang/tags/net-pull-request:
Fix virtio-net-pci* "vectors" compat
e1000: fix tx re-entrancy problem
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/core/machine.c | 2 | ||||
-rw-r--r-- | hw/net/e1000.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c index 948b3d9524..26ec54e726 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -56,7 +56,7 @@ GlobalProperty hw_compat_5_2[] = { { "ICH9-LPC", "smm-compat", "on"}, { "PIIX4_PM", "smm-compat", "on"}, { "virtio-blk-device", "report-discard-granularity", "off" }, - { "virtio-net-pci", "vectors", "3"}, + { "virtio-net-pci-base", "vectors", "3"}, }; const size_t hw_compat_5_2_len = G_N_ELEMENTS(hw_compat_5_2); diff --git a/hw/net/e1000.c b/hw/net/e1000.c index a30546c5d5..f5bc81296d 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -107,6 +107,7 @@ struct E1000State_st { e1000x_txd_props props; e1000x_txd_props tso_props; uint16_t tso_frames; + bool busy; } tx; struct { @@ -763,6 +764,11 @@ start_xmit(E1000State *s) return; } + if (s->tx.busy) { + return; + } + s->tx.busy = true; + while (s->mac_reg[TDH] != s->mac_reg[TDT]) { base = tx_desc_base(s) + sizeof(struct e1000_tx_desc) * s->mac_reg[TDH]; @@ -789,6 +795,7 @@ start_xmit(E1000State *s) break; } } + s->tx.busy = false; set_ics(s, 0, cause); } |