[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH] i.MX: Fix FEC/ENET receive funtions

From: Jean-Christophe Dubois
Subject: Re: [Qemu-arm] [PATCH] i.MX: Fix FEC/ENET receive funtions
Date: Fri, 12 Jan 2018 18:24:53 +0100
User-agent: Roundcube Webmail/1.1.2

Le 2018-01-12 18:08, Peter Maydell a écrit :
On 10 January 2018 at 20:38, Jean-Christophe Dubois <address@hidden> wrote:
The actual imx_eth_enable_rx() function is buggy.

It updates s->regs[ENET_RDAR] after calling qemu_flush_queued_packets().

qemu_flush_queued_packets() is going to call imx_XXX_receive() which itself
is going to call imx_eth_enable_rx().

By updating s->regs[ENET_RDAR] after calling qemu_flush_queued_packets()
we end up updating the register with an outdated value which might
lead to disabling the receive function in the i.MX FEC/ENET device.

This patch change the place where the register update is done so that the
register value stays up to date and the receive function can keep

Reported-by: Fyleo <address@hidden>
Tested-by: Fyleo <address@hidden>
Signed-off-by: Jean-Christophe Dubois <address@hidden>

Could you have a look at current QEMU master, please? I think that
commit b2b012afdd9c has probably fixed this bug. (At any rate it
has changed that code so that your patch won't apply.)

It seems the patch (imx_fec: Refactor imx_eth_enable_rx()) only renamed a variable (from tmp to rx_ring_full) without changing the logic. So I don't expect the bug to be fixed in mainline.

I'll rebase and resubmit my patch.


-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]