From 758fa943274bd4a5fd3caed9ed951ca69182f8c2 Mon Sep 17 00:00:00 2001 From: bjh21 Date: Tue, 27 Mar 2001 22:17:51 +0000 Subject: [PATCH] Print the address within the Rx buffer whenever anything goes wrong: it seems to be significant. --- sys/dev/ic/seeq8005.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/dev/ic/seeq8005.c b/sys/dev/ic/seeq8005.c index 00255961f000..d2259c66d0e0 100644 --- a/sys/dev/ic/seeq8005.c +++ b/sys/dev/ic/seeq8005.c @@ -1,4 +1,4 @@ -/* $NetBSD: seeq8005.c,v 1.16 2001/03/27 21:43:13 bjh21 Exp $ */ +/* $NetBSD: seeq8005.c,v 1.17 2001/03/27 22:17:51 bjh21 Exp $ */ /* * Copyright (c) 2000 Ben Harris @@ -64,7 +64,7 @@ #include #include -__RCSID("$NetBSD: seeq8005.c,v 1.16 2001/03/27 21:43:13 bjh21 Exp $"); +__RCSID("$NetBSD: seeq8005.c,v 1.17 2001/03/27 22:17:51 bjh21 Exp $"); #include #include @@ -1097,18 +1097,20 @@ ea_getpackets(struct seeq8005_softc *sc) ++ifp->if_ierrors; /* XXX oversize packets may be OK */ log(LOG_WARNING, - "%s: rx packet error (%02x) - dropping packet\n", - sc->sc_dev.dv_xname, status & 0x0f); + "%s: rx packet error at %04x (err=%02x)\n", + sc->sc_dev.dv_xname, addr, status & 0x0f); goto pktdone; } /* * Is the packet too big ? - this will probably be trapped - * above as a receive error + * above as a receive error. If it's not, this is indicative + * of buffer corruption. */ if (__predict_false(len > (ETHER_MAX_LEN - ETHER_CRC_LEN))) { ++ifp->if_ierrors; - log(LOG_WARNING, "%s: rx packet size error len=%d\n", - sc->sc_dev.dv_xname, len); + log(LOG_ERR, + "%s: rx packet size error at %04x (len=%d)\n", + sc->sc_dev.dv_xname, addr, len); sc->sc_config2 |= SEEQ_CFG2_OUTPUT; bus_space_write_2(iot, ioh, SEEQ_CONFIG2, sc->sc_config2);