diff options
author | Richard Henderson | 2021-11-05 14:59:19 +0100 |
---|---|---|
committer | Richard Henderson | 2021-11-05 14:59:19 +0100 |
commit | e4d96a7eb83146c936d88182c8dee9ba899bb6bb (patch) | |
tree | a95c21d12770e94f41c0f3640be6f40dd0a155dc /hw/net/e1000.c | |
parent | Merge remote-tracking branch 'remotes/stsquad/tags/pull-for-6.2-041121-2' int... (diff) | |
parent | Fix virtio-net-pci* "vectors" compat (diff) | |
download | qemu-e4d96a7eb83146c936d88182c8dee9ba899bb6bb.tar.gz qemu-e4d96a7eb83146c936d88182c8dee9ba899bb6bb.tar.xz qemu-e4d96a7eb83146c936d88182c8dee9ba899bb6bb.zip |
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/net/e1000.c')
-rw-r--r-- | hw/net/e1000.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); } |