Module Name: src Committed By: martin Date: Sat May 11 14:43:00 UTC 2024
Modified Files: src/sys/arch/hp300/stand/common [netbsd-10]: if_le.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #685): sys/arch/hp300/stand/common/if_le.c: revision 1.15 sys/arch/hp300/stand/common/if_le.c: revision 1.16 Avoid an extern declaration in .c file. Just declare it as static. Suggested on tech-userlevel@. 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.14 -r1.14.2.1 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.14 src/sys/arch/hp300/stand/common/if_le.c:1.14.2.1 --- src/sys/arch/hp300/stand/common/if_le.c:1.14 Mon Nov 21 15:36:29 2022 +++ src/sys/arch/hp300/stand/common/if_le.c Sat May 11 14:43:00 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_le.c,v 1.14 2022/11/21 15:36:29 tsutsui Exp $ */ +/* $NetBSD: if_le.c,v 1.14.2.1 2024/05/11 14:43:00 martin Exp $ */ /* * Copyright (c) 1993 Adam Glass @@ -98,7 +98,7 @@ static struct le_sel le0conf[] = { }; #define NLE0CONF (sizeof(le0conf) / sizeof(le0conf[0])) -extern struct netif_stats le_stats[]; +static struct netif_stats le_stats[]; static struct netif_dif le_ifs[] = { /* dif_unit dif_nsel dif_stats dif_private */ @@ -106,7 +106,7 @@ static struct netif_dif le_ifs[] = { }; #define NLE_IFS (sizeof(le_ifs) / sizeof(le_ifs[0])) -struct netif_stats le_stats[NLE_IFS]; +static struct netif_stats le_stats[NLE_IFS]; struct netif_driver le_driver = { "le", /* netif_bname */ @@ -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)