This is in accordance with section 3.4.7 of the datasheet:
When the system appends more descriptors, the SONIC releases ownership
of the descriptor after writing 0000h to the RXpkt.in_use field.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
hw/net/dp8393x.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index f35b8b48aa..6b69cca329 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -806,6 +806,15 @@ static ssize_t dp8393x_receive(NetClientState *nc, const uint8_t * buf,
return -1;
}
/* Link has been updated by host */
+
+ /* Clear in_use */
+ size = sizeof(uint16_t) * width;
+ address = dp8393x_crda(s) + sizeof(uint16_t) * 6 * width;
+ dp8393x_put(s, width, 0, 0);
+ address_space_rw(&s->as, address, MEMTXATTRS_UNSPECIFIED,
+ (uint8_t *)s->data, size, 1);
+
+ /* Move to next descriptor */
s->regs[SONIC_CRDA] = s->regs[SONIC_LLFA];
}
--
2.23.0