Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Make error checking/reporting a little more corr...



details:   https://anonhg.NetBSD.org/src/rev/fa4f0fe4c542
branches:  trunk
changeset: 511326:fa4f0fe4c542
user:      simonb <simonb%NetBSD.org@localhost>
date:      Mon Jun 18 01:58:08 2001 +0000

description:
Make error checking/reporting a little more correct.

diffstat:

 sys/dev/pci/if_sip.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 82332f51e068 -r fa4f0fe4c542 sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c      Mon Jun 18 01:55:12 2001 +0000
+++ b/sys/dev/pci/if_sip.c      Mon Jun 18 01:58:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sip.c,v 1.33 2001/06/12 22:28:16 thorpej Exp $      */
+/*     $NetBSD: if_sip.c,v 1.34 2001/06/18 01:58:08 simonb Exp $       */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -1388,15 +1388,16 @@
                 */
                if (cmdsts &
                    (CMDSTS_Tx_TXA|CMDSTS_Tx_TFU|CMDSTS_Tx_ED|CMDSTS_Tx_EC)) {
+                       ifp->if_oerrors++;
+                       if (cmdsts & CMDSTS_Tx_EC)
+                               ifp->if_collisions += 16;
                        if (ifp->if_flags & IFF_DEBUG) {
-                               if (CMDSTS_Tx_ED)
+                               if (cmdsts & CMDSTS_Tx_ED)
                                        printf("%s: excessive deferral\n",
                                            sc->sc_dev.dv_xname);
-                               if (CMDSTS_Tx_EC) {
+                               if (cmdsts & CMDSTS_Tx_EC)
                                        printf("%s: excessive collisions\n",
                                            sc->sc_dev.dv_xname);
-                                       ifp->if_collisions += 16;
-                               }
                        }
                } else {
                        /* Packet was transmitted successfully. */



Home | Main Index | Thread Index | Old Index