[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/15] hw/net/e1000e: Fix size of io operations
From: |
Richard Henderson |
Subject: |
[PATCH 08/15] hw/net/e1000e: Fix size of io operations |
Date: |
Sat, 19 Jun 2021 10:26:19 -0700 |
The size of the operation is an argument to the respective
functions, and has nothing to do with sizeof(val).
Cc: Jason Wang <jasowang@redhat.com>
Cc: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
hw/net/e1000e.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
index a8a77eca95..ea3347fbb4 100644
--- a/hw/net/e1000e.c
+++ b/hw/net/e1000e.c
@@ -145,7 +145,7 @@ e1000e_io_read(void *opaque, hwaddr addr, unsigned size)
return s->ioaddr;
case E1000_IODATA:
if (e1000e_io_get_reg_index(s, &idx)) {
- val = e1000e_core_read(&s->core, idx, sizeof(val));
+ val = e1000e_core_read(&s->core, idx, size);
trace_e1000e_io_read_data(idx, val);
return val;
}
@@ -171,7 +171,7 @@ e1000e_io_write(void *opaque, hwaddr addr,
case E1000_IODATA:
if (e1000e_io_get_reg_index(s, &idx)) {
trace_e1000e_io_write_data(idx, val);
- e1000e_core_write(&s->core, idx, val, sizeof(val));
+ e1000e_core_write(&s->core, idx, val, size);
}
return;
default:
--
2.25.1
- [PATCH 00/15] accel/tcg: Fix for #360 and other i/o alignment issues, Richard Henderson, 2021/06/19
- [PATCH 01/15] NOTFORMERGE q800: test case for do_unaligned_access issue, Richard Henderson, 2021/06/19
- [PATCH 04/15] accel/tcg: Don't test for watchpoints for code read, Richard Henderson, 2021/06/19
- [PATCH 05/15] accel/tcg: Handle page span access before i/o access, Richard Henderson, 2021/06/19
- [PATCH 03/15] accel/tcg: Use byte ops for unaligned loads, Richard Henderson, 2021/06/19
- [PATCH 06/15] softmmu/memory: Inline memory_region_dispatch_read1, Richard Henderson, 2021/06/19
- [PATCH 02/15] accel/tcg: Extract load_helper_unaligned from load_helper, Richard Henderson, 2021/06/19
- [PATCH 08/15] hw/net/e1000e: Fix size of io operations,
Richard Henderson <=
- [PATCH 09/15] hw/net/e1000e: Fix impl.min_access_size, Richard Henderson, 2021/06/19
- [PATCH 07/15] softmmu/memory: Simplify access_with_adjusted_size interface, Richard Henderson, 2021/06/19
- [PATCH 11/15] hw/scsi/megasas: Fix megasas_mmio_ops sizes, Richard Henderson, 2021/06/19
- [PATCH 10/15] hw/pci-host/q35: Improve blackhole_ops, Richard Henderson, 2021/06/19
- [PATCH 13/15] softmmu/memory: Disallow short writes, Richard Henderson, 2021/06/19
- [PATCH 12/15] hw/scsi/megasas: Improve megasas_queue_ops min_access_size, Richard Henderson, 2021/06/19
- [PATCH 15/15] RFC accel/tcg: Defer some unaligned accesses to memory subsystem, Richard Henderson, 2021/06/19