summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_nfe.c10
-rw-r--r--sys/dev/pci/if_nfereg.h9
2 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index d24ef80da8a..1e5ed34056d 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfe.c,v 1.56 2006/04/26 01:33:38 brad Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.57 2006/04/26 02:07:29 jsg Exp $ */
/*-
* Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -813,8 +813,8 @@ nfe_txeof(struct nfe_softc *sc)
goto skip;
if ((flags & NFE_TX_ERROR_V1) != 0) {
- printf("%s: tx v1 error 0x%04x\n",
- sc->sc_dev.dv_xname, flags);
+ printf("%s: tx v1 error 0x%04b\n",
+ sc->sc_dev.dv_xname, flags, NFE_V1_TXERR);
ifp->if_oerrors++;
} else
ifp->if_opackets++;
@@ -823,8 +823,8 @@ nfe_txeof(struct nfe_softc *sc)
goto skip;
if ((flags & NFE_TX_ERROR_V2) != 0) {
- printf("%s: tx v2 error 0x%04x\n",
- sc->sc_dev.dv_xname, flags);
+ printf("%s: tx v2 error 0x%04b\n",
+ sc->sc_dev.dv_xname, flags, NFE_V2_TXERR);
ifp->if_oerrors++;
} else
ifp->if_opackets++;
diff --git a/sys/dev/pci/if_nfereg.h b/sys/dev/pci/if_nfereg.h
index 36d131bf6d8..79eab5149c7 100644
--- a/sys/dev/pci/if_nfereg.h
+++ b/sys/dev/pci/if_nfereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfereg.h,v 1.16 2006/02/22 19:23:44 damien Exp $ */
+/* $OpenBSD: if_nfereg.h,v 1.17 2006/04/26 02:07:30 jsg Exp $ */
/*-
* Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org>
@@ -151,6 +151,10 @@ struct nfe_desc32 {
#define NFE_TX_LASTFRAG_V1 (1 << 0)
} __packed;
+#define NFE_V1_TXERR "\020" \
+ "\14TXERROR\13UNDERFLOW\12LATECOLLISION\11LOSTCARRIER\10DEFERRED" \
+ "\08FORCEDINT\03RETRY\00LASTPACKET"
+
/* V2 Rx/Tx descriptor */
struct nfe_desc64 {
uint32_t physaddr[2];
@@ -165,6 +169,9 @@ struct nfe_desc64 {
#define NFE_TX_LASTFRAG_V2 (1 << 13)
} __packed;
+#define NFE_V2_TXERR "\020" \
+ "\14FORCEDINT\13LASTPACKET\12UNDERFLOW\10LOSTCARRIER\09DEFERRED\02RETRY"
+
/* flags common to V1/V2 descriptors */
#define NFE_RX_CSUMOK 0x1c00
#define NFE_RX_ERROR (1 << 14)