summary refs log tree commit diff stats
path: root/hw/core/machine.c
diff options
context:
space:
mode:
authorChristina Wang <christina.wang@windriver.com>2021-07-23 15:55:11 +0800
committerJason Wang <jasowang@redhat.com>2021-08-02 12:19:18 +0800
commitd897056960fb379302cc9b656b899829f571eb6e (patch)
treef7ab7067739a9741b0484b15fa2bc19e31a66c97 /hw/core/machine.c
parenta1d7e475beb5c9e7a8e1213f29b0d20a208a9ade (diff)
downloadfocaccia-qemu-d897056960fb379302cc9b656b899829f571eb6e.tar.gz
focaccia-qemu-d897056960fb379302cc9b656b899829f571eb6e.zip
hw/net: e1000e: Correct the initial value of VET register
The initial value of VLAN Ether Type (VET) register is 0x8100, as per
the manual and real hardware.

While Linux e1000e driver always writes VET register to 0x8100, it is
not always the case for everyone. Drivers relying on the reset value
of VET won't be able to transmit and receive VLAN frames in QEMU.

Unlike e1000 in QEMU, e1000e uses a field 'vet' in "struct E1000Core"
to cache the value of VET register, but the cache only gets updated
when VET register is written. To always get a consistent VET value
no matter VET is written or remains its reset value, drop the 'vet'
field and use 'core->mac[VET]' directly.

Reported-by: Markus Carlstedt <markus.carlstedt@windriver.com>
Signed-off-by: Christina Wang <christina.wang@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/core/machine.c')
-rw-r--r--hw/core/machine.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index f98a797e43..943974d411 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -42,6 +42,7 @@ GlobalProperty hw_compat_6_0[] = {
     { "i8042", "extended-state", "false"},
     { "nvme-ns", "eui64-default", "off"},
     { "e1000", "init-vet", "off" },
+    { "e1000e", "init-vet", "off" },
 };
 const size_t hw_compat_6_0_len = G_N_ELEMENTS(hw_compat_6_0);