ref: 2273121e1cfe765f30467bdab842cae8b0d88cd3
parent: f1a32c955360268a7bc901de057e6e451c979853
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Jul 14 20:48:52 EDT 2023
etherimx: ignore trailing 4 byte garbage in ethernet receive packet There are 4 trailing bytes (fcs?) in the received packet, which is a problem for devbridge when forwarding the frame to another interface as it makes it oversized.
--- a/sys/src/9/imx8/etherimx.c
+++ b/sys/src/9/imx8/etherimx.c
@@ -435,7 +435,7 @@
}
if(((s^RD_L) & (RD_L|RD_ERR)) == 0){
b = ctlr->rx->b[i];
- b->wp = b->rp + (s & RD_LEN);
+ b->wp = b->rp + (s & RD_LEN) - 4;
dmaflush(0, b->rp, BLEN(b));
etheriq(edev, b);