[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 14/16] net/dp8393x: correctly reset in_use field
From: |
Hervé Poussineau |
Subject: |
[Qemu-devel] [PATCH v3 14/16] net/dp8393x: correctly reset in_use field |
Date: |
Wed, 3 Jun 2015 22:45:48 +0200 |
Don't write more than the field width, which is always 16 bit.
Fixes network in NetBSD 5.1/arc
Signed-off-by: Hervé Poussineau <address@hidden>
Reviewed-by: Aurelien Jarno <address@hidden>
---
hw/net/dp8393x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 4184045..ff633f7 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -764,7 +764,7 @@ static ssize_t dp8393x_receive(NetClientState *nc, const
uint8_t * buf,
data[0 * width] = 0; /* in_use */
address_space_rw(&s->as,
((s->regs[SONIC_URDA] << 16) | s->regs[SONIC_CRDA]) +
sizeof(uint16_t) * 6 * width,
- MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, size, 1);
+ MEMTXATTRS_UNSPECIFIED, (uint8_t *)data, sizeof(uint16_t), 1);
s->regs[SONIC_CRDA] = s->regs[SONIC_LLFA];
s->regs[SONIC_ISR] |= SONIC_ISR_PKTRX;
s->regs[SONIC_RSC] = (s->regs[SONIC_RSC] & 0xff00) |
(((s->regs[SONIC_RSC] & 0x00ff) + 1) & 0x00ff);
--
2.1.4
- [Qemu-devel] [PATCH v3 01/16] mips jazz: compile only in 64 bit, (continued)
- [Qemu-devel] [PATCH v3 01/16] mips jazz: compile only in 64 bit, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 06/16] dma/rc4030: use trace events instead of custom logging, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 02/16] dma/rc4030: create custom DMA address space, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 08/16] net/dp8393x: always calculate proper checksums, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 07/16] dma/rc4030: convert to QOM, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 09/16] net/dp8393x: do not use old_mmio accesses, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 03/16] dma/rc4030: use AddressSpace and address_space_rw in users, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 13/16] net/dp8393x: add load/save support, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 15/16] net/dp8393x: fix hardware reset, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 14/16] net/dp8393x: correctly reset in_use field,
Hervé Poussineau <=
- [Qemu-devel] [PATCH v3 10/16] net/dp8393x: use dp8393x_ prefix for all functions, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 11/16] net/dp8393x: QOM'ify, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 16/16] [RFC] dma/rc4030: do multiple calls to address_space_rw when doing DMA transfers, Hervé Poussineau, 2015/06/03
- [Qemu-devel] [PATCH v3 12/16] net/dp8393x: add PROM to store MAC address, Hervé Poussineau, 2015/06/03