* eth frame error on imx6ul @ 2024-08-05 13:48 Stefano Manni 2024-08-05 13:54 ` Ahmad Fatoum 0 siblings, 1 reply; 5+ messages in thread From: Stefano Manni @ 2024-08-05 13:48 UTC (permalink / raw) To: barebox Hello, on a target based on imx6ul I see lots of errors like this when connected to the company LAN: WARNING: eth0: error frame: 0x87ed5190 0x00000886 where 0x00000886 means "frame length violation" (FEC_RBD_LG). It seems to be an HW issue BUT on another target based on imx6x with exactly the same HW block for ethernet I never see this error. Have you ever faced something like this? Thanks, Stefano ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: eth frame error on imx6ul 2024-08-05 13:48 eth frame error on imx6ul Stefano Manni @ 2024-08-05 13:54 ` Ahmad Fatoum 2024-08-05 14:38 ` Stefano Manni 0 siblings, 1 reply; 5+ messages in thread From: Ahmad Fatoum @ 2024-08-05 13:54 UTC (permalink / raw) To: Stefano Manni, barebox Hello Stefano, On 05.08.24 15:48, Stefano Manni wrote: > Hello, > > on a target based on imx6ul I see lots of errors like this when > connected to the company LAN: > > WARNING: eth0: error frame: 0x87ed5190 0x00000886 > > where 0x00000886 means "frame length violation" (FEC_RBD_LG). > > It seems to be an HW issue BUT on another target based on imx6x with > exactly the same HW block for ethernet I never see this error. > > Have you ever faced something like this? Do you have TFTP or something running while seeing these errors, or when do they pop up? Cheers, Ahmad > > Thanks, > Stefano > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: eth frame error on imx6ul 2024-08-05 13:54 ` Ahmad Fatoum @ 2024-08-05 14:38 ` Stefano Manni 2024-08-05 16:57 ` Ahmad Fatoum 0 siblings, 1 reply; 5+ messages in thread From: Stefano Manni @ 2024-08-05 14:38 UTC (permalink / raw) To: Ahmad Fatoum, barebox Hello Ahmad On Mon, 2024-08-05 at 15:54 +0200, Ahmad Fatoum wrote: > > Do you have TFTP or something running while seeing these errors, > or when do they pop up? They pop up unconditionally just after ifup. If I run tcpdump on the same LAN I see a lot of multicast/broadcast frames and probably the error comes out on the reception of them. Also because I figured out from fec_imx.h that 0x00000886 means: #define FEC_RBD_LAST 0x0800 /**< Receive BD status: Buffer is last in frame (useless here!) */ #define FEC_RBD_BC 0x0080 /**< Receive BD status: The received frame is broadcast frame */ #define FEC_RBD_CR 0x0004 /**< Receive BD status: CRC error */ #define FEC_RBD_OV 0x0002 /**< Receive BD status: Receive FIFO overrun */ Best, Stefano ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: eth frame error on imx6ul 2024-08-05 14:38 ` Stefano Manni @ 2024-08-05 16:57 ` Ahmad Fatoum 2024-08-06 7:59 ` Stefano Manni 0 siblings, 1 reply; 5+ messages in thread From: Ahmad Fatoum @ 2024-08-05 16:57 UTC (permalink / raw) To: Stefano Manni, barebox On 05.08.24 16:38, Stefano Manni wrote: > Hello Ahmad > > On Mon, 2024-08-05 at 15:54 +0200, Ahmad Fatoum wrote: >> >> Do you have TFTP or something running while seeing these errors, >> or when do they pop up? > > They pop up unconditionally just after ifup. If I run tcpdump on the > same LAN I see a lot of multicast/broadcast frames and probably the > error comes out on the reception of them. Also because I figured out > from fec_imx.h that 0x00000886 means: > > #define FEC_RBD_LAST 0x0800 /**< Receive BD status: Buffer > is last in frame (useless here!) */ > #define FEC_RBD_BC 0x0080 /**< Receive BD status: The > received frame is broadcast frame */ > #define FEC_RBD_CR 0x0004 /**< Receive BD status: CRC > error */ > #define FEC_RBD_OV 0x0002 /**< Receive BD status: Receive > FIFO overrun */ You can enable CONFIG_CMD_ETHLOG to capture the frames and see if the frame that triggers the error looks odd in some way. Cheers, Ahmad > > Best, > Stefano > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: eth frame error on imx6ul 2024-08-05 16:57 ` Ahmad Fatoum @ 2024-08-06 7:59 ` Stefano Manni 0 siblings, 0 replies; 5+ messages in thread From: Stefano Manni @ 2024-08-06 7:59 UTC (permalink / raw) To: Ahmad Fatoum, barebox 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-06 8:00 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-08-05 13:48 eth frame error on imx6ul 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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox