Skip to content

Commit "stmmac: align RX buffers" breaks PSE Ethernet on Elkhart Lake #24

@tq-schifferm

Description

@tq-schifferm

After updating to the latest version of meta-intel, the PSE Ethernet on our Elkhart Lake hardware stopped working. In tcpdump, we are seeing complete corruption of the headers of received packets. Example of a DHCP packet:

Sent:

0000   00 d0 93 30 3a 17 00 24 9b 20 44 0c 08 00 45 10   .Ð.0:..$. D...E.
0010   01 48 00 00 00 00 80 11 a5 5b c0 a8 09 85 c0 a8   .H......¥[À¨..À¨
0020   09 64 00 43 00 44 01 34 21 39 02 01 06 00 e5 a4   .d.C.D.4!9....å¤
0030   2b da 02 03 00 00 00 00 00 00 c0 a8 09 64 c0 a8   +Ú........À¨.dÀ¨
0040   09 85 00 00 00 00 00 d0 93 30 3a 17 00 00 00 00   .......Ð.0:.....
0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00a0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00b0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00c0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00d0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00e0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00f0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0100   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0110   00 00 00 00 00 00 63 82 53 63 35 01 02 36 04 c0   ......c.Sc5..6.À
0120   a8 09 85 33 04 00 00 00 3c 01 04 ff ff ff 00 03   ¨..3....<..ÿÿÿ..
0130   04 c0 a8 09 85 06 04 c0 a8 09 85 ff 00 00 00 00   .À¨....À¨..ÿ....
0140   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0150   00 00 00 00 00 00                                 ......

Received (on Elkhart Lake):

0000   6e bf c2 05 62 8a 58 d1 c9 36 83 e5 4f 60 a0 40   n¿Â.b.XÑÉ6.åO` @
0010   b8 a7 6e d6 b5 33 05 f6 af 6f 22 83 4f 47 15 2c   ¸§nÖµ3.ö¯o".OG.,
0020   9b 72 c6 af 4d b6 d7 9d 88 72 02 01 06 00 e5 a4   .rƯM¶×..r....å¤
0030   2b da 02 03 00 00 00 00 00 00 c0 a8 09 64 c0 a8   +Ú........À¨.dÀ¨
0040   09 85 00 00 00 00 00 d0 93 30 3a 17 00 00 00 00   .......Ð.0:.....
0050   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0060   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0070   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0080   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0090   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00a0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00b0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00c0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00d0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00e0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
00f0   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0100   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0110   00 00 00 00 00 00 63 82 53 63 35 01 02 36 04 c0   ......c.Sc5..6.À
0120   a8 09 85 33 04 00 00 00 3c 01 04 ff ff ff 00 03   ¨..3....<..ÿÿÿ..
0130   04 c0 a8 09 85 06 04 c0 a8 09 85 ff 00 00 00 00   .À¨....À¨..ÿ....
0140   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0150   00 00 00 00 00 00                                 ......

The corruption spans the first 42 bytes, exactly the length of the Ethernet+IPv4+UDP headers.

Both lts-v5.10.41-yocto-210621T194959Z and lts-v5.10.41-yocto-210707T232614Z are affected (I haven't tested other versions). A bisect found d95b18b ("stmmac: align RX buffers") as the culprit; reverting this commit solves the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions