From 5a460a150b60697933209f9196cbf9550b50d0eb Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 3 Jan 2025 09:24:18 +0000 Subject: [PATCH] nusb/ether: dont break lan78xx chip (rpi3b+) The rpi3b+ uses different chip lan78xx. This one does not append fcs in received frames, so the previous change broke ethernet. --- sys/src/cmd/nusb/ether/lan78xx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/src/cmd/nusb/ether/lan78xx.c b/sys/src/cmd/nusb/ether/lan78xx.c index 38e77e4a4..3f7c1d190 100644 --- a/sys/src/cmd/nusb/ether/lan78xx.c +++ b/sys/src/cmd/nusb/ether/lan78xx.c @@ -252,11 +252,10 @@ lan78xxreceive(Dev *ep) break; if((hd & Rxerror) == 0){ if(n == BLEN(b)){ - b->wp -= 4; etheriq(b); return 0; } - etheriq(copyblock(b, n - 4)); + etheriq(copyblock(b, n)); } b->rp = (uchar*)(((uintptr)b->rp + n + 3)&~3); }