Module Name:    src
Committed By:   tsutsui
Date:           Mon Apr 29 14:42:07 UTC 2024

Modified Files:
        src/sys/arch/hp300/stand/common: if_le.c

Log Message:
Don't panic as a fatal error on receiving packets with invalid length.

Such errors could happen on aged and fragile 10BASE-2 hub etc.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/hp300/stand/common/if_le.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp300/stand/common/if_le.c
diff -u src/sys/arch/hp300/stand/common/if_le.c:1.15 src/sys/arch/hp300/stand/common/if_le.c:1.16
--- src/sys/arch/hp300/stand/common/if_le.c:1.15	Fri Apr 21 22:43:11 2023
+++ src/sys/arch/hp300/stand/common/if_le.c	Mon Apr 29 14:42:07 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le.c,v 1.15 2023/04/21 22:43:11 tsutsui Exp $	*/
+/*	$NetBSD: if_le.c,v 1.16 2024/04/29 14:42:07 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1993 Adam Glass
@@ -492,8 +492,9 @@ le_poll(struct iodesc *desc, void *pkt, 
 		printf("le_poll: length %d\n", length);
 #endif
 	if (length >= BUFSIZE) {
+		printf("le%d_poll: invalid length %d, status 0x%x\n",
+		    unit, length, stat);
 		length = 0;
-		panic("csr0 when bad things happen: %x", stat);
 		goto cleanup;
 	}
 	if (!length)

Reply via email to