On 21/09/2016 15:45, P J P wrote:
> DPRINTF("tx_bd %x flags %04x len %d data %08x\n",
> addr, bd.flags, bd.length, bd.data);
> - if ((bd.flags & FEC_BD_R) == 0) {
> + if (!bd.length || (bd.flags & FEC_BD_R) == 0) {
> /* Run out of descriptors to transmit. */
> break;
> }
Is this a bug?
I don't see anything problematic if len == 0 in the remainder of the code,
though I see a bug:
diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
index 0ee8ad9..5a5fc69 100644
--- a/hw/net/mcf_fec.c
+++ b/hw/net/mcf_fec.c
@@ -176,7 +176,7 @@ static void mcf_fec_do_tx(mcf_fec_state *s)
if (bd.flags & FEC_BD_L) {
/* Last buffer in frame. */
DPRINTF("Sending packet\n");
- qemu_send_packet(qemu_get_queue(s->nic), frame, len);
+ qemu_send_packet(qemu_get_queue(s->nic), frame, frame_size);
ptr = frame;
frame_size = 0;
s->eir |= FEC_INT_TXF;
Paolo