From: Stefano Manni <stefano.manni@gmail.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: eth frame error on imx6ul
Date: Tue, 06 Aug 2024 09:59:21 +0200 [thread overview]
Message-ID: <ef001d53a29c13aee55c240c0dfc33d4eb26853a.camel@gmail.com> (raw)
In-Reply-To: <9695c594-d410-4e72-afeb-68777a82ce71@pengutronix.de>
Hello Ahmad,
On Mon, 2024-08-05 at 18:57 +0200, Ahmad Fatoum wrote:
> You can enable CONFIG_CMD_ETHLOG to capture the frames and see if
> the frame that triggers the error looks odd in some way.
>
unfortunately ethlog cannot be used because fec_recv() -> net_receive()
-> rx_monitor() is not called when the frame is invalid.
So I've patched in some way fec_recv() to print out the frame in case
of error:
diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index 75a6596282..d2fb617631 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -579,6 +579,10 @@ static int fec_recv(struct eth_device *dev)
if (bd_status & FEC_RBD_ERR) {
dev_warn(&dev->dev, "error frame: 0x%p 0x%08x\n",
rbd, bd_status);
+
+ dev_print_hex_dump(&dev->dev, KERN_DEBUG, "",
+ DUMP_PREFIX_OFFSET, 16, 1, rbd-
>data_pointer, rbd->data_length, true);
+
} else if (bd_status & FEC_RBD_LAST) {
const uint16_t data_length = readw(&rbd->data_length);
And these are some of the frames I see:
WARNING: eth0: error frame: 0x87ed50e8 0x00000886
eth0: 00000000: ff ff ff ff ff ff 00 50 56 ad 1c 33 08 06 00 01
eth0: 00000010: 08 00 06 04 00 01 00 50 56 ad 1c 33 c0 a8 d8 d0
eth0: 00000020: 00 00 00 00 00 00 c0 a8 d7 de 00 00 00 00 00 00
eth0: 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 ec 3f
WARNING: eth0: error frame: 0x87ed5190 0x00000886
eth0: 00000000: ff ff ff ff ff ff 00 50 56 ad f3 d9 08 06 00 01
eth0: 00000010: 08 00 06 04 00 01 00 50 56 ad f3 d9 c0 a8 d5 42
eth0: 00000020: 00 00 00 00 00 00
WARNING: eth0: error frame: 0x87ed5198 0x00000886
eth0: 00000000: ff ff ff ff ff ff 00 1e 2a c1 b4 8c 08 00 45 00
eth0: 00000010: 00 4e 94 ec 00 00 80 11 4a 99 c0 a8 d9 c8 c0 a8
eth0: 00000020: ff ff 00 89 00 89 00 3a 1b 08 d2 c3 01 10 00 01
eth0: 00000030: 00 00 00 00 00 00 20 46 44 45 4c 46 4a 46
Focusing on the first two, they are ARP but look odd, they should be 60
byte long.
Any idea?
Best,
Stefano
prev parent reply other threads:[~2024-08-06 8:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 13:48 Stefano Manni
2024-08-05 13:54 ` Ahmad Fatoum
2024-08-05 14:38 ` Stefano Manni
2024-08-05 16:57 ` Ahmad Fatoum
2024-08-06 7:59 ` Stefano Manni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef001d53a29c13aee55c240c0dfc33d4eb26853a.camel@gmail.com \
--to=stefano.manni@gmail.com \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox