Skip to content

MT-149497: net: fec: add imx8mm devinfo with UDP checksum quirk#42

Open
Overdr0ne wants to merge 1 commit into
MultiTracksDotCom:developfrom
Overdr0ne:MT-149497
Open

MT-149497: net: fec: add imx8mm devinfo with UDP checksum quirk#42
Overdr0ne wants to merge 1 commit into
MultiTracksDotCom:developfrom
Overdr0ne:MT-149497

Conversation

@Overdr0ne
Copy link
Copy Markdown

@Overdr0ne Overdr0ne commented Jun 3, 2026

MT-149497

So I basically just had Claude implement the Option B fix here. I've only really done a build test so far.

The imx8mm FEC hardware RX checksum offload engine incorrectly marks certain UDP packets as checksum-valid, causing them to be silently dropped by the kernel UDP stack.

Add a dedicated fsl,imx8mm-fec compatible string, which previously fell through to fsl,imx8mq-fec, and a new FEC_QUIRK_ERR_UDP_CSUM quirk. When the quirk is set, downgrade CHECKSUM_UNNECESSARY to CHECKSUM_NONE for UDP packets only after the HW reports no error, forcing the kernel UDP stack to re-validate the checksum in software. TCP checksum offload is unaffected.

dev QA: @AmeNote-Michael

The imx8mm FEC hardware RX checksum offload engine incorrectly marks
certain UDP packets as checksum-valid, causing them to be silently
dropped by the kernel UDP stack.

Add a dedicated fsl,imx8mm-fec compatible string, which previously
fell through to fsl,imx8mq-fec, and a new FEC_QUIRK_ERR_UDP_CSUM
quirk. When the quirk is set, downgrade CHECKSUM_UNNECESSARY to
CHECKSUM_NONE for UDP packets only after the HW reports no error,
forcing the kernel UDP stack to re-validate the checksum in
software. TCP checksum offload is unaffected.
Copilot AI review requested due to automatic review settings June 3, 2026 23:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds i.MX8MM FEC support and introduces a quirk/workaround for a hardware RX checksum offload issue affecting UDP.

Changes:

  • Add i.MX8MM-specific fec_devinfo and register it via platform IDs + DT compatible match.
  • Introduce a new quirk bit (FEC_QUIRK_ERR_UDP_CSUM) for the i.MX8MM UDP RX checksum validation issue.
  • Adjust RX checksum handling to force software validation for UDP when the quirk is enabled.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
drivers/net/ethernet/freescale/fec_main.c Registers imx8mm variant and changes RX checksum behavior under a new quirk.
drivers/net/ethernet/freescale/fec.h Defines a new quirk flag to gate the UDP checksum workaround.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1806 to +1815
/* i.MX8MM FEC HW checksum offload incorrectly
* validates certain UDP packets (FEC_QUIRK_ERR_UDP_CSUM).
* Force software re-validation for UDP only.
*/
if (fep->quirks & FEC_QUIRK_ERR_UDP_CSUM) {
struct iphdr *iph = (struct iphdr *)skb_network_header(skb);

if (iph && iph->protocol == IPPROTO_UDP)
skb->ip_summed = CHECKSUM_NONE;
}
Comment on lines +517 to +521
/* i.MX8MM FEC hardware RX checksum offload incorrectly validates certain UDP
* packets, causing them to be silently dropped by the kernel UDP stack.
* Force software re-validation for UDP by downgrading CHECKSUM_UNNECESSARY.
*/
#define FEC_QUIRK_ERR_UDP_CSUM BIT(25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants